diff options
author | ondrej.zara <none@none> | 2011-06-14 08:47:42 +0000 |
---|---|---|
committer | ondrej.zara <none@none> | 2011-06-14 08:47:42 +0000 |
commit | 8a659daa006d21d1740976f877b4ee35fdc1a0cf (patch) | |
tree | f6314b14cf1de8e5c0f61239047036a29afadc0b | |
parent | ffa05817ab182ca57cc9e251ed3669bd7095d7b7 (diff) | |
download | wwwsqldesigner-8a659daa006d21d1740976f877b4ee35fdc1a0cf.zip wwwsqldesigner-8a659daa006d21d1740976f877b4ee35fdc1a0cf.tar.gz wwwsqldesigner-8a659daa006d21d1740976f877b4ee35fdc1a0cf.tar.bz2 |
delete key inactive in form fields, closes issue 130
--HG--
extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%40126
-rw-r--r-- | js/wwwsqldesigner.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js index 2cee59c..3bf19f9 100644 --- a/js/wwwsqldesigner.js +++ b/js/wwwsqldesigner.js @@ -1663,9 +1663,13 @@ SQL.TableManager.prototype.save = function() { } SQL.TableManager.prototype.press = function(e) { - if (! this.selection.length) { return; } - /* do not process keypresses if a row is selected */ - if (this.owner.rowManager.selected) { return; } + var target = OZ.Event.target(e).nodeName.toLowerCase(); + if (target == "textarea" || target == "input") { return; } /* not when in form field */ + + if (this.owner.rowManager.selected) { return; } /* do not process keypresses if a row is selected */ + + if (!this.selection.length) { return; } /* nothing if selection is active */ + switch (e.keyCode) { case 46: this.remove(); @@ -1837,6 +1841,10 @@ SQL.RowManager.prototype.redraw = function() { SQL.RowManager.prototype.press = function(e) { if (!this.selected) { return; } + + var target = OZ.Event.target(e).nodeName.toLowerCase(); + if (target == "textarea" || target == "input") { return; } /* not when in form field */ + switch (e.keyCode) { case 38: this.up(); |