diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-05-27 19:21:05 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-06-09 00:08:25 +0000 |
commit | 83e16b89a2c95ce72f861bb2057eb5de9782b928 (patch) | |
tree | f274dcfd512108c860ea47ccbeba387c07b4bc8f /core/src | |
parent | fc56c0eb918969dea22d75c47f8d218b01ec1ec6 (diff) | |
download | nextcloud-server-83e16b89a2c95ce72f861bb2057eb5de9782b928.tar.gz nextcloud-server-83e16b89a2c95ce72f861bb2057eb5de9782b928.zip |
Prevent pressing enter key without control focus from activating the primary button
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/jquery/ocdialog.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/core/src/jquery/ocdialog.js b/core/src/jquery/ocdialog.js index 4579f420625..312e52395da 100644 --- a/core/src/jquery/ocdialog.js +++ b/core/src/jquery/ocdialog.js @@ -92,18 +92,6 @@ $.widget('oc.ocdialog', { event.preventDefault() return false } - // If no button is selected we trigger the primary - if ( - self.$buttonrow - && self.$buttonrow.find($(event.target)).length === 0 - ) { - const $button = self.$buttonrow.find('button.primary') - if ($button && !$button.prop('disabled')) { - $button.trigger('click') - } - } else if (self.$buttonrow) { - $(event.target).trigger('click') - } return false } }) |