mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-62756 form: Remove any click handler first.
The handler has the old state variable. Remove any click handler first.
This commit is contained in:
parent
33a388eff7
commit
5cfd7a7286
2 changed files with 3 additions and 1 deletions
2
lib/amd/build/form-autocomplete.min.js
vendored
2
lib/amd/build/form-autocomplete.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -683,6 +683,8 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
|
|||
}
|
||||
|
||||
var suggestionsElement = $(document.getElementById(state.suggestionsId));
|
||||
// Remove any click handler first.
|
||||
suggestionsElement.parent().prop("onclick", null).off("click");
|
||||
suggestionsElement.parent().on('click', '[role=option]', function(e) {
|
||||
var pendingKey = 'form-autocomplete-parent';
|
||||
M.util.js_pending(pendingKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue