mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Use keyboard controls with the action buttons
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
16d2238de5
commit
edba92d1f4
3 changed files with 7 additions and 5 deletions
6
core/src/jquery/ocdialog.js
vendored
6
core/src/jquery/ocdialog.js
vendored
|
|
@ -141,8 +141,10 @@ $.widget('oc.ocdialog', {
|
|||
self.$defaultButton = $button
|
||||
}
|
||||
self.$buttonrow.append($button)
|
||||
$button.click(function() {
|
||||
val.click.apply(self.element[0], arguments)
|
||||
$button.on('click keydown', function(event) {
|
||||
if (event.type === 'click' || (event.type === 'keydown' && event.key === 'Enter')) {
|
||||
val.click.apply(self.element[0], arguments)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$buttonrow.find('button')
|
||||
|
|
|
|||
4
dist/core-main.js
vendored
4
dist/core-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-main.js.map
vendored
2
dist/core-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue