mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
settings: Fix input mouse behaviour in custom profile fields.
Add input to filter in sortablejs config. This prevents drag and drog from being called on clicking input field. Also set preventOnFilter to false. This prevents disabling the default behaviour on the click event. Fixes #17619
This commit is contained in:
@@ -268,6 +268,8 @@ function set_up_choices_field_edit_form(profile_field, field_data) {
|
||||
update_choice_delete_btn(choice_list, false);
|
||||
Sortable.create(choice_list[0], {
|
||||
onUpdate() {},
|
||||
filter: "input",
|
||||
preventOnFilter: false,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -407,6 +409,8 @@ export function do_populate_profile_fields(profile_fields_data) {
|
||||
const field_list = $("#admin_profile_fields_table")[0];
|
||||
Sortable.create(field_list, {
|
||||
onUpdate: update_field_order,
|
||||
filter: "input",
|
||||
preventOnFilter: false,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -422,6 +426,8 @@ function set_up_choices_field() {
|
||||
const choice_list = $("#profile_field_choices")[0];
|
||||
Sortable.create(choice_list, {
|
||||
onUpdate() {},
|
||||
filter: "input",
|
||||
preventOnFilter: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user