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:
tushar912 2021-03-15 17:55:35 +05:30 committed by Tim Abbott
parent 9a6cb441e1
commit c6d1fbd051
1 changed files with 6 additions and 0 deletions

View File

@ -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,
});
}