-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird behavior with custom extenders #335
Comments
Hi @larivierec! If you look at the So, after you call a I'm not quite sure why the dialog initialization code has a Hopefully that will get things working as expected. If not, you can modify this demo I put together to show the issue that is occurring: http://jsfiddle.net/Mottie/egb3a1sk/134/ |
Hello again, yes you are right concerning the enternavigation... ill take those off in the morning however, the base.accept() part is still weird. This function already has a return false; why would I have to add another one if it's already contained in it's function... secondly, i stated that this code that i had posted works with a Breakpoint and doesn't work without one. |
If you look at line 663 you'll see that a I can't tell exactly what is happening just from looking at the code... is the dialog ok button being used to validate the input, or the keyaction code for enter supposed to do that? Have you looked into using the validate callback function? Here is an updated version of the demo I shared above with a validate function - it prevents the user from clicking accept when the password is invalid. I don't see why the dialog would need any buttons... If that isn't the way you want to use the keyboard, then please modify the demo so I can better understand your goal. |
Alright so the problem now is that if you are using a regular keyboard and I push the enter button it doesn't work. I modified the code a bit having tried the version with the accepted callback... When I use the actual keyboard it does not enter the accepted callback function specified is this because it is not being shown at the time of pushing enter? enter: function(base,e){
if (base.el.tagName === "INPUT") {
if(base.el.id == "txtBoxAdminPass")
{
base.accept();
return false;
}
}
}, Thanks again for your feedback, |
I added this to an updated demo and it appears to work for me: $.keyboard.keyaction.enter = function(base, el){
if (base.el.id == "txtBoxAdminPass") {
base.accept();
return false;
}
}; |
Right... I also did the same thing by adding a function and seeing if both enters worked... and it did I dont understand what is happening, anyway ill keep looking into it... Thanks |
So, that demo is working as you'd expect it right? I didn't think the Oh, I did have to add this to the dialog initialization code (demo): close: function(){
$('#txtBoxAdminPass').getkeyboard().close();
} because without that code, if you click the dialog box "x" to close it, the keyboard stays open. |
The demo worked at exactly as i'd expect, it's quite sad that the code is so similar and behaves differently |
I ran into an issue yesterday where I kept typing |
i just noticed something, if i dont do $("#dialogPassword").dialog("close"); |
I'm guessing this issue has been resolved, so I'm going to close it. If you continue to have problems, please feel free to continue this discussion. |
no, i havent figure it out. but you can close it.
|
What was the remaining issue? |
its the same issue, no matter what code I put the enter key does not close |
Can you modify one of the demos I shared to duplicate this issue. It would make it so much easier to troubleshoot the problem. Right now I'm just guessing. |
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:
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:
and a text field with options:
The text was updated successfully, but these errors were encountered: