diff --git a/docs/index.html b/docs/index.html index 74040fe..e39cc29 100755 --- a/docs/index.html +++ b/docs/index.html @@ -40,6 +40,13 @@

jPanelMenu

+
+

Sample with inputfields

+
+ + +
+

Version 1.1

@@ -549,6 +556,11 @@

Who Made This Wonderful Little Plugin?

--> - + + + + + + \ No newline at end of file diff --git a/jPanelMenu-1.1.0.js b/jPanelMenu-1.1.0.js index 55ae1b8..2f556c0 100644 --- a/jPanelMenu-1.1.0.js +++ b/jPanelMenu-1.1.0.js @@ -443,7 +443,18 @@ }, initiateKeyboardListeners: function() { + var preventKeyListeners = ['input', 'textarea']; $(document).on('keydown',function(e){ + var $target = $(e.target), + prevent = false; + $.each(preventKeyListeners, function(){ + if ($target.is(this.toString())) { // no shurtcuts in form fields + prevent = true; + } + }); + if (prevent) { + return true; + } for ( mapping in jP.options.keyboardShortcuts ) { if ( e.which == jP.options.keyboardShortcuts[mapping].code ) {