Open GoogleCodeExporter opened 8 years ago
use lower case notation for 'shift+', 'alt+' and 'ctrl+'
Original comment by chpalati...@gmail.com
on 4 Dec 2009 at 8:51
I have the same issue with unbind.
I have been trying to bind when an input textbox takes focus and unbind on blur
of
the textbox.
It binds correctly on focus but wont unbind on blur. This means that each time
you
click in a textbox (give it focus) its binding multiple times.
I thought this may be due to the cursor being inside a textbox and so the
hotkeys are
disabled. But im not convinced this is the problem as surely it should still
unbind.
Ive been using this code to try it out...
var row;
//identify input with focus
$('input[name=autoSaveOrderItem]').live('focus', function() {
//identify row id with focus
var row = $(this).parent().parent().attr('id');
console.log('focused');
//F6 duplicate item line
$(this).bind('keydown', 'f6', function (){
console.log('bound');
//return false;
});//bind
}).live('blur', function() {
//var row = null;
console.log('blurred');
$(this).unbind('keydown', 'f6', function (){
console.log('unbound');
return false;
});//unbind
});
Is it possible to exclude keys from ever being disabled inside a textbox ie the
function keys and other keys that have no effect on text inputs?
Original comment by benho...@gmail.com
on 26 Feb 2010 at 4:29
Original issue reported on code.google.com by
joshua.b...@gmail.com
on 23 Jun 2009 at 9:06