Merge pull request #7701 from netchampfaris/table-multiselect-focus

fix: Focus input on multiselect area click
This commit is contained in:
Rushabh Mehta 2019-06-14 16:17:32 +05:30 committed by GitHub
commit 6aa0887baf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,12 @@ frappe.ui.form.ControlTableMultiSelect = frappe.ui.form.ControlLink.extend({
// used as an internal model to store values
this.rows = [];
this.$input_area.on('click', (e) => {
if (e.target === this.$input_area.get(0)) {
this.$input.focus();
}
});
this.$input_area.on('click', '.btn-remove', (e) => {
const $target = $(e.currentTarget);
const $value = $target.closest('.tb-selected-value');