You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When listening for the Enter key to be pressed when hovered class is present I kick of the kb.accept() method.
// submit if virtual enter key is pressed $.extend($.keyboard.keyaction, {
enter : function(kb) {
var _text = kb.$keyboard.find('.ui-state-hover')[0].textContent;
if (_text == 'Enter') kb.accept();
}
});
// push keyboard entry to proper field
$('#keyboard').on('accepted',function(e, keyboard, el) {
closeDialog(); // <- hide div that keyboard is present in
keyboardElm.val(el.value);
keyboardElm.focus();
keyboardElm='';
});
When I do this I get the following error:
jquery.keyboard.extension-navigation.js:120 Uncaught TypeError: base.$keyboard.toggleClass is not a function
at $.keyboard.base.checkKeys (jquery.keyboard.extension-navigation.js:120)
at HTMLInputElement. (jquery.keyboard.extension-navigation.js:105)
at HTMLInputElement.dispatch (jquery-3.2.1.min.js:3)
at HTMLInputElement.q.handle (jquery-3.2.1.min.js:3)
base.checkKeys @ jquery.keyboard.extension-navigation.js:120
(anonymous) @ jquery.keyboard.extension-navigation.js:105
dispatch @ jquery-3.2.1.min.js:3
q.handle @ jquery-3.2.1.min.js:3
The text was updated successfully, but these errors were encountered:
This doesn't seem to be an issue I can reproduce. Please verify that the jquery.keyboard.js file is loaded before the jquery.keyboard.extension-navigation.js file in the HTML. If that isn't the issue, then please modify this demo to show the error.
In my keyboard configuration I'm using the navigation extension with togglemode set to true.
$('#keyboard').keyboard({
position: "center",
alwaysOpen: false
}).addNavigation({
toggleMode: true,
rowLooping: true
});
When listening for the Enter key to be pressed when hovered class is present I kick of the kb.accept() method.
// submit if virtual enter key is pressed
$.extend($ .keyboard.keyaction, {
enter : function(kb) {
var _text = kb.$keyboard.find('.ui-state-hover')[0].textContent;
if (_text == 'Enter') kb.accept();
}
});
// push keyboard entry to proper field
$('#keyboard').on('accepted',function(e, keyboard, el) {
closeDialog(); // <- hide div that keyboard is present in
keyboardElm.val(el.value);
keyboardElm.focus();
keyboardElm='';
});
When I do this I get the following error:
jquery.keyboard.extension-navigation.js:120 Uncaught TypeError: base.$keyboard.toggleClass is not a function
at $.keyboard.base.checkKeys (jquery.keyboard.extension-navigation.js:120)
at HTMLInputElement. (jquery.keyboard.extension-navigation.js:105)
at HTMLInputElement.dispatch (jquery-3.2.1.min.js:3)
at HTMLInputElement.q.handle (jquery-3.2.1.min.js:3)
base.checkKeys @ jquery.keyboard.extension-navigation.js:120
(anonymous) @ jquery.keyboard.extension-navigation.js:105
dispatch @ jquery-3.2.1.min.js:3
q.handle @ jquery-3.2.1.min.js:3
The text was updated successfully, but these errors were encountered: