Hi, i am facing a Hotkey Problem with the actual 2.2 RC2 build.
I am using following hotkey,
<p:hotkey bind="f3" handler="clickLink('form','3');" />
and the clicklink method is executed every time any key is pressed.
It seems to me the bind value is not evaluated correctly!?
Am i doing somethin wrong?
With the 2.0.2 build everything works fine..
A simple example..
<p:hotkey bind="a" handler="alert('a pressed');" />
The alert appears for every pressed key.
hotkey fires on each key
have you tried using the key-combination of the showcase-example? (which is "ctrl+shift+s")
maybe it's not even possible to bind to a single character key or the f-keys
you might wanna check out the jQuery documentaion for the bind-function, as jQuery is used to realize the behaviour of the <p:hotkey>-component
maybe it's not even possible to bind to a single character key or the f-keys
you might wanna check out the jQuery documentaion for the bind-function, as jQuery is used to realize the behaviour of the <p:hotkey>-component
I tried the key-combination of the showcase-example.. and i get the same error!
At the moment i press "ctrl" (or any other key!!!) the handler is called/ the alert apears immediately.
For me the handler is called, doesn't matter which key is bind!
I'm going to have a look for the jQuery documentation.
At the moment i press "ctrl" (or any other key!!!) the handler is called/ the alert apears immediately.
For me the handler is called, doesn't matter which key is bind!
I'm going to have a look for the jQuery documentation.
I think i found the problem.
The "HotkeyRenderer" class has a new implementation with this version.
With an earlier version of this class everything works fine.
With 2.2 the "jQuery(document).bind(....)" is encapsulated with "jQuery(function() {
example: -->
with 2.0.2 or 2.1: jQuery(document).bind('keydown', 'a', function(){alert('a pressed');;});
with 2.2: jQuery(function() {jQuery(document).bind('keydown', 'a', function(){alert('a pressed');;return false;});});
Maybe someone can explain the changes?
Maybe there is a failure?
The "HotkeyRenderer" class has a new implementation with this version.
With an earlier version of this class everything works fine.
With 2.2 the "jQuery(document).bind(....)" is encapsulated with "jQuery(function() {
example: -->
with 2.0.2 or 2.1: jQuery(document).bind('keydown', 'a', function(){alert('a pressed');;});
with 2.2: jQuery(function() {jQuery(document).bind('keydown', 'a', function(){alert('a pressed');;return false;});});
Maybe someone can explain the changes?
Maybe there is a failure?