mirror of
https://github.com/moodle/moodle.git
synced 2025-07-22 23:01:21 +02:00
MDL-35954 javascript: prevent JS from being triggered on select box by clicking on already selected option
This commit is contained in:
@@ -414,6 +414,7 @@ M.util.init_select_autosubmit = function(Y, formid, selectid, nothing) {
|
||||
if (e.button == 1) {
|
||||
buttonflag = 1;
|
||||
}
|
||||
paramobject.lastindex = select.get('selectedIndex');
|
||||
};
|
||||
|
||||
var changedown = function(e, paramobject) {
|
||||
@@ -421,6 +422,7 @@ M.util.init_select_autosubmit = function(Y, formid, selectid, nothing) {
|
||||
if(e.keyCode == 13) {
|
||||
form.submit();
|
||||
}
|
||||
paramobject.lastindex = select.get('selectedIndex');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user