aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts/behaviour.js
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2020-12-03 20:01:57 +0100
committerAndreas Gohr <andi@splitbrain.org>2020-12-03 20:01:57 +0100
commit413313a1557b246296ce666c3c01263a139988e1 (patch)
tree8a8c5baecc9bd872d31aad136097d9acd8a651b0 /lib/scripts/behaviour.js
parentb102b83e6dd0a6634b8108bc334f78ba0957d247 (diff)
parent6071f0eef30466192d0db9320b73a17c5ef7df39 (diff)
downloaddokuwiki-413313a1557b246296ce666c3c01263a139988e1.tar.gz
dokuwiki-413313a1557b246296ce666c3c01263a139988e1.zip
Merge branch 'logging'
* logging: added JavaScript based filter mechanism added logging configuration replaced out calls to dbglog with new Logger calls added convenience methods to log to our default facilities added logviwer admin plugin added log dir to git central logging mechanism
Diffstat (limited to 'lib/scripts/behaviour.js')
-rw-r--r--lib/scripts/behaviour.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js
index f152fbb2e..70b60ef9a 100644
--- a/lib/scripts/behaviour.js
+++ b/lib/scripts/behaviour.js
@@ -114,15 +114,18 @@ var dw_behaviour = {
/**
* Autosubmit quick select forms
*
- * When a <select> tag has the class "quickselect", this script will
+ * When a <select> or <input> tag has the class "quickselect", this script will
* automatically submit its parent form when the select value changes.
* It also hides the submit button of the form.
*
+ * This includes a workaround a weird behaviour when the submit button has a name
+ *
+ * @link https://trackjs.com/blog/when-form-submit-is-not-a-function/
* @author Andreas Gohr <andi@splitbrain.org>
*/
quickSelect: function(){
- jQuery('select.quickselect')
- .on('change', function(e){ e.target.form.submit(); })
+ jQuery('.quickselect')
+ .change(function(e){ HTMLFormElement.prototype.submit.call(e.target.form); })
.closest('form').find(':button').not('.show').hide();
},