[FIX] website: fix trigger of website_url_chosen
Before this commit, website_url_chosen was triggered when the dropdown of the input closed instead of when an item was selected in the list. This caused the following issue: you lost focus in the input every time the list closed while typing. After this commit, website_url_chosen is only triggered when an item is selected in the results list of a urlpicker input. Part of #62971 task-2312878 X-original-commit: a4cf182211de21970d5261713c5cbae3e609cfb1
This commit is contained in:
@@ -88,8 +88,10 @@ function autocompleteWithPages(self, $input) {
|
||||
});
|
||||
}
|
||||
},
|
||||
close: function () {
|
||||
select: function (ev, ui) {
|
||||
ev.target.value = ui.item.value;
|
||||
self.trigger_up('website_url_chosen');
|
||||
ev.preventDefault();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user