-
Notifications
You must be signed in to change notification settings - Fork 726
Closed
Description
Hello,
I have been using this keyboard for the past month and i've been having trouble understanding why the same code works in Debug and in normal "Release" mode it doesnt work.
Here is the snippet:
$.extend($.keyboard.keyaction, {
enter: function(base,e){
if (base.el.tagName === "INPUT") {
if(base.el.id == "txtBoxAdminPass")
{
//$('#passbtn_click').click();
base.accept();
if (adminCheckPassword($('#txtBoxAdminPass').val()))
{
setAdminMode(true);
$('#dialogPassword').dialog( "close" );
}
else
{
alert("Invalid Password");
}
txtBoxAdminPass.value = "";
}
}
}what happens is that if I use this exact code to check the password without a break point it goes right through it. If I add a breakpoint to this exact code, anywhere, it works... i'm not quite sure why.
Any guidance would be accepted... Also take note that they're no overwriting of the enter other than this location.
This is contained in a dialog with options as follows:
$( "#dialogPassword" ).dialog({
autoOpen: false,
modal: true,
width: 450,
height:200,
enterNavigation:false,
buttons: [
{
text: translate("ok_trans"),
click: function() {
var txtBoxAdminPass = document.getElementById("txtBoxAdminPass");
if (adminCheckPassword(txtBoxAdminPass.value))
{
setAdminMode(true);
$(this).dialog( "close" );
}
else
{
alert("Invalid Password");
}
txtBoxAdminPass.value = "";
},
id:'passbtn_click'
},
{
text: translate("cancel_trans"),
click: function() { $(this).dialog('close'); txtBoxAdminPass.value = "";}
}]
});and a text field with options:
$('#txtBoxAdminPass').keyboard({
openOn: null,
usePreview : false,
maxLength : 12,
autoAccept: true,
enterNavigation:true
});