Allow enter key to trigger dialog buttons.
This commit is contained in:
parent
9480783353
commit
2bb1434a46
2 changed files with 6 additions and 2 deletions
|
@ -31,7 +31,11 @@ define(["editor", "dom2"], function(editor) {
|
|||
var onKeyPress = function(e) {
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
//allow Enter to trigger clicks
|
||||
console.log(e.keyCode);
|
||||
if (e.keyCode != 13) {
|
||||
e.preventDefault();
|
||||
}
|
||||
buttons.forEach(function(options) {
|
||||
if (typeof options == "string") return;
|
||||
if (options.shortcut && options.shortcut == String.fromCharCode(e.charCode)) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "Caret",
|
||||
"description": "Professional text editing for Chrome and Chrome OS",
|
||||
"version": "1.2.6",
|
||||
"version": "1.2.7",
|
||||
"manifest_version": 2,
|
||||
"icons": {
|
||||
"128": "icon-128.png"
|
||||
|
|
Loading…
Reference in a new issue