summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-05-27 19:21:05 +0000
committerChristopher Ng <chrng8@gmail.com>2022-06-09 00:08:25 +0000
commit83e16b89a2c95ce72f861bb2057eb5de9782b928 (patch)
treef274dcfd512108c860ea47ccbeba387c07b4bc8f /core/src
parentfc56c0eb918969dea22d75c47f8d218b01ec1ec6 (diff)
downloadnextcloud-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.js12
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
}
})