Masking characters pushed when typing in the input field on Kindle Gen 6 Devices #443

Closed
nitishdhar opened this Issue Mar 5, 2014 · 14 comments

Projects

None yet

2 participants

@nitishdhar

Hey,

There is a weird issue on specific kindle devices (Gen 6) If a field has input masking applied, when user goes inside the field & starts typing, instead of the masking characters getting consumed as user types in, the characters are just pushed forward in the input field.

Eg:

( ) - ____ - _____

If the above the the masking. Once user starts typing, it goes like this -

999( ) - ____ - ____

This happens with the other masking library as well - http://digitalbush.com/projects/masked-input-plugin/

Any idea what could be causing this. I understand this is something kindle's browser is not understanding, but can you tell me which part handles this & if some workaround can be implemented to make it work.

Thanks a lot.

@RobinHerbots
Owner

@nitishdhar,

That is because the keydown keypress input keyup events aren't handled correctly on android based devices.See #434

If you have a look into the jquery.inputmask.js and search on mobileinputevent you can reënable handling off input solely based on the inputevent; This will work in some cases but isn't 100% reliable. See issues for android browsers.

best regards,
Robin

@RobinHerbots RobinHerbots added this to the 2.6 milestone Mar 5, 2014
@RobinHerbots
Owner

Is there an emulator for the Kindle Gen 6?

Can you test which events get fired on keystroke especially on non-numeric input. On chrome for android it is only in the case of non-numeric input the events aren't fired.

@RobinHerbots RobinHerbots modified the milestone: 2.7, 2.6 Mar 5, 2014
@nitishdhar

alright. Also you mean i need to specify the input type to be number & it works in some cases?

@nitishdhar

and could you please explain this - "you can reënable handling off input solely based on the inputevent;" I am not sure what I should do.

@nitishdhar

also, we are in the process to migrate to the new masked library (this one) but we are currently using the old one, would it be too much to ask for, if you could help with a fix for this in this library - https://raw.github.com/digitalBush/jquery.maskedinput/1.3.1/dist/jquery.maskedinput.js

thanks

@RobinHerbots
Owner

@nitishdhar ,

No I mean if you use a mask like 999-999-999 it will work on android chrome but a mask like aaa-aaa not. This is because in the case of the aaa-aaa mask the keydown keypress events aren't fired.

In the code there is an attempt to handle this, but it is commented out see #434.

Sorry, but I don't have time to solve bugs of another masking library and even if I had, I don't have a fully working solution for the issue.

Maybe we should take a look at the source of Chromium

@nitishdhar

sure thanks a lot.. ill keep you posted if anything works

@nitishdhar

Hey,

I got it working with your library by un-commenting that mobileinput event part & also adding another device check for kindle -

kindle = /Kindle/i.test(ua) || /Silk/i.test(ua) || /KFTT/i.test(ua) || /KFOT/i.test(ua) || /KFJWA/i.test(ua) || /KFJWI/i.test(ua) || /KFSOWI/i.test(ua) || /KFTHWA/i.test(ua) || /KFTHWI/i.test(ua) || /KFAPWA/i.test(ua) || /KFAPWI/i.test(ua);

@nitishdhar nitishdhar closed this Mar 6, 2014
@RobinHerbots
Owner

@nitishdhar,

And is the backspace and typing more characters then possible correctly handled?

@nitishdhar

yes everything is handled properly.

@RobinHerbots
Owner

Which browser is the kindle using as default?

2014-03-06 21:50 GMT+01:00 Nitish Dhar notifications@github.com:

http://jsfiddle.net/ftnU7/8/


Reply to this email directly or view it on GitHubhttps://github.com/RobinHerbots/jquery.inputmask/issues/443#issuecomment-36935257
.

@nitishdhar

I guess it uses the webview of Silk browser.

@digitalBush digitalBush referenced this issue in digitalBush/jquery.maskedinput Oct 13, 2014
Open

Mobile Issues #258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment