diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/jquery/ocdialog.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/jquery/ocdialog.js b/core/src/jquery/ocdialog.js index 312e52395da..91466f6fec5 100644 --- a/core/src/jquery/ocdialog.js +++ b/core/src/jquery/ocdialog.js @@ -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') |