Сonfiguration:
- Jquery - 1.12.4
- jquery.keyboard - 1.26.19
- browser - firefox 52.0.2 (x86)
Action:
- Add handling for
beforeInsert event, that just return textToAdd
- Start typing from physical keyboard then use arrow keys or F1 and etc.
Result:
Instead navigation by text we get symbols inserted in text.
Example:
http://jsfiddle.net/VikEdit/z3jtn6wy/
Cause
Before calling
jquery.keyboard.js#L806
base.insertText(base.last.key);
e.preventDefault();
We need analyze is it text, number key or functional key by e.keyCode or e.key.length, cause firefox raise keypress event for functional keys too.
I figured out, that when firefox raise keypress event for functional keys it put incorrect data in which and charCode (charCode alwayse is zero and which zero or keyCode from table more often zero)
Сonfiguration:
Action:
beforeInsertevent, that just returntextToAddResult:
Instead navigation by text we get symbols inserted in text.
Example:
http://jsfiddle.net/VikEdit/z3jtn6wy/
Cause
Before calling
jquery.keyboard.js#L806
We need analyze is it text, number key or functional key by
e.keyCodeore.key.length, cause firefox raise keypress event for functional keys too.I figured out, that when firefox raise
keypressevent for functional keys it put incorrect data inwhichandcharCode(charCodealwayse is zero andwhichzero or keyCode from table more often zero)