Skip to content
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

Some bug fixes and a jQuery Mobile 1.4 demo/test. #234

Merged
merged 1 commit into from
Feb 9, 2014

Conversation

BrandonLWhite
Copy link
Contributor

I ran into a few issues with your "builtLayouts" code changes, and have addressed them here.
I'm also including a demo/test page for jQM 1.4 which contains the code I'm using in my application for destroying the keyboard on hide.
I haven't yet run this new approach on my ARM industrial device, but I'm hopeful it will improve the performance. I will let you know how it goes. Thanks for the "builtLayouts" changes -- it's a good idea.

One other thing I want to point out, is that "custom" layouts will be problematic with builtLayouts if you try to use more than one custom layout in a page. That will need to be addressed.


Added demo page for jQuery Mobile 1.4.
Fixed focus issue in extension-mobile.
Fixed issue with startup() not creating $preview or checking the builtLayouts cache.
Added null check of $keyboard before calling .hide(), to avoid null exception if the keyboard has been destroyed.
Added back 'return container' to buildKeyboard.

Fixed focus issue in extension-mobile.
Fixed issue with startup() not creating $preview or checking the builtLayouts cache.
Added null check of $keyboard before calling .hide(), to avoid null exception if the keyboard has been destroyed.
Added back 'return container' to buildKeyboard.
Mottie added a commit that referenced this pull request Feb 9, 2014
Some bug fixes and a jQuery Mobile 1.4 demo/test.
@Mottie Mottie merged commit cf967e9 into Mottie:working Feb 9, 2014
@Mottie
Copy link
Owner

Mottie commented Feb 9, 2014

Thanks @BrandonLWhite!

I'm not sure where the "Fixed issue with startup() not creating $preview" came from, since it was in the startup code to allow different types of inputs to be attached. Still, everything looks good.

Thanks again!

@Mottie
Copy link
Owner

Mottie commented Feb 9, 2014

Oh, and in the jquery-mobile-1.4.html file... I just tried it in Chrome on my desktop and the input of type number is preventing me from entering a number using the virtual keyboard. I can backspace to delete, but nothing else.

Also, there is a built-in check which enables/disables the decimal button (line 790 & line 819 in the working branch), but only if you name it {dec} within the layout (which you did).

@@ -296,12 +296,14 @@ $.keyboard = function(el, options){
};

base.startup = function(){
if ( $.isFunction(o.create) ) {
base.$keyboard = o.create(base);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I was seeing is that this call to create would happen...

@BrandonLWhite
Copy link
Contributor Author

tried it in Chrome on my desktop and the input of type number is preventing me from entering a number using the virtual keyboard

Yikes! You are right. Even though I was using Chrome too, I was just using my real keyboard to test (which seems to work) instead of clicking the virtual keyboard keys. I'll investigate.

there is a built-in check which enables/disables the decimal button

Indeed, but I couldn't see a way for it to disable the decimal button entirely for that were flagged as whole numbers only (step="1"). If I've missed something please let me know.

@BrandonLWhite
Copy link
Contributor Author

Quick update regarding:

tried it in Chrome on my desktop and the input of type number is preventing me from entering a number using the virtual keyboard

I tried jquery-mobile-1.4.html with the master branch and it doesn't suffer from this issue. So it seems that the 'builtLayouts' optimization may be causing the issue. I'll try and look into it later today (if you don't beat me to it!). I'm wondering if we don't need to clone the element for the preview each time -- just a hunch.

@Mottie
Copy link
Owner

Mottie commented Feb 10, 2014

Optionally, you could set the usePreview option to false and it would just use the original input.

Which browser are you using on mobile?

@BrandonLWhite
Copy link
Contributor Author

Thanks for the tip on usePreview: false I hadn't noticed it. That's actually better for my application, but unfortunately the issue still persists without a preview.

The browser I'm using is Chrome. On our target industrial HMI it is a webkit based browser provided by the manufacturer.

@BrandonLWhite
Copy link
Contributor Author

tried it in Chrome on my desktop and the input of type number is preventing me from entering a number using the virtual keyboard

This is fixed now in #235.

@Mottie
Copy link
Owner

Mottie commented Feb 19, 2014

Just letting you know I fixed the custom keyboard issue... the layout is now saved using a name of "custom" + a hash of the layout.

@BrandonLWhite
Copy link
Contributor Author

Ok cool. I hope to get some time testing out the latest before the week is up.

@Mottie
Copy link
Owner

Mottie commented Feb 25, 2014

Hey @BrandonLWhite, check out issue #241... I'm not sure this effects mobile platforms, but I may have to make a change that only allows the keyboard to initialize on certain input types (not numbers types).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants