jquery-meiomask icon indicating copy to clipboard operation
jquery-meiomask copied to clipboard

Mieomask is not working in mobile devices

Open rajrizzila opened this issue 11 years ago • 9 comments

I have used mieomask to set mask for phone number . but if i viewed in mobile devices the mask is improper and could not able to delete the numbers entered. Deleting functionality has completely stopped working

rajrizzila avatar Jun 26 '13 06:06 rajrizzila

Can you give us more details about which browser, OS versions you are using? Also what is the plugin version. Thank you!

fabiomcosta avatar Jun 26 '13 06:06 fabiomcosta

meiomask version - 1.0.4

IPAD Version - 6.1.3

Browser - Safari

rajrizzila avatar Jun 26 '13 06:06 rajrizzila

I am seeing it in meiomask v.1.1.5 on android 4.2.2 in chrome 18.0.1025469.
For delete, it appears that android chrome ends up in iphone mode. During _onKeyDown(), ignoreKeys is [10, 127] so the backspace (8) is not being ignored. That makes it fall through to key processing which just says backspace is not valid for the mask, and it gets eaten.

In addition, it is sometimes losing characters as I type because when it adds mask characters, it is ending up with the cursor in the wrong place. So if I type 1234567890 I end up with (234) 678-0.

I stepped through it a little. It appears on the tablet that the result of getRange is different than on the desktop. Using a US Phone number mask, enter first number, the desktop finally ends up in the onPaste method with a range of 0..2, whereas on the tablet it is 0..1. That puts the cursor between '(' and the entered '1' on the tablet, and typing another number overwrites the '1'.

cgoluska avatar Jun 29 '13 19:06 cgoluska

@cgoluska , I made a correction of the problem, if you can test the fix on their devices, test with this file "assets/javascript/jquery.meio.mask.js". if work, i will generate new version.

Thanks.

johnvoloski avatar Jul 01 '13 15:07 johnvoloski

Hello John, I had the same problem and, in hope of a solution, found this issue and tried your test code.

The first problem is if your jQuery has already defined $.browser, the android property is not init'ed. I am not sure if it exists if the browser property is defined by other means.

If the first problem is bypassed, the second problem is that apparently (tested in android Nexus S emulator, version 2.3.3) android document does not have the "selection" property present in IE. That means using IE code to solve the problem won't work.

Do you have any other insights on how to make this work?

Thanks,

Fernando

febpetroni avatar Jul 18 '13 21:07 febpetroni

FYI... this might have to do with this issue:

http://code.google.com/p/android/issues/detail?id=15245

febpetroni avatar Jul 19 '13 18:07 febpetroni

Also having issue with IOS6/Ipad.

Using 1.1.11 with a very simple mask ("*") and the ipad delete button does not work at all.

Applying using:

$('[data-mask]').setMask({ attr: 'data-mask', type: 'repeat', autoTab: false, selectCharsOnFocus: false });

Seems fine on desktop. Just a problem on IOS. Any ideas?

devtrends avatar Aug 18 '13 18:08 devtrends

Doesn't work for me, Note 2 & Tab 3 , Android, Chrome.

blowsie avatar Feb 20 '14 11:02 blowsie

Doesn't work for me, Ipad, IPhone 6s.

Any solution?

Guilhermimma avatar Dec 22 '16 16:12 Guilhermimma