Ngx-mask: Buggy on Mobile devices

Created on 28 Feb 2018  路  25Comments  路  Source: JsDaddy/ngx-mask

When typing, the cursor moves to a position before the last inserted character (Galaxy S5, Galaxy S7, Moto G4 Play).

In older devices (Galaxy J2 mini), the cursor doesn't moves as well and all the characters are inserted to the right of the cursor.

You can test it in: https://jsdaddy.github.io/ngx-mask/

Some other plugins, seems to have fixed it by changing the input.selectionStart usage by input.selectionEnd.

As you can see, selectionStart is used here:

https://github.com/JsDaddy/ngx-mask/blob/f83223332b9a462ce9b4863bf185952a5a8f21c3/src/app/ngx-mask/mask.directive.ts#L69

And also used here:

https://github.com/JsDaddy/ngx-mask/blob/f83223332b9a462ce9b4863bf185952a5a8f21c3/src/app/ngx-mask/mask.directive.ts#L76

Related: https://github.com/angular-ui/ui-mask/pull/200

help wanted question wontfix

Most helpful comment

This is occurring on Samsung Internet browser

image

All 25 comments

I had the same problem.

For numeric input just use input type 'tel' like
<input type="tel" mask="000 000 000" />
It will work smoothly on mobile devices

Not on Samsungs or any other device that doesn't supports tel.

had same issue about a year ago. thought it was resolved

@odahcam @felipecslima 小ould you check latest version ?

Looks ok in my Moto G4. 馃帀
Gonna try to test in more devices along the next week.

@odahcam Awesome , waiting for your feedback

Stills buggy on Galaxy J5 Pro with Samsung Internet:
image

Image provided by @anologicon

Works ok on Chrome in the same device.

Does anyone have a solution to this issue? I am facing an issue when my mask is to input date like MM/YYYY after slash cursor moves forward and start entering values reverse.

Thanks in advance

@NepipenkoIgor seems like this issue should be reopened. :/

@LimarenkoDenis and @NepipenkoIgor its mainly happen in MOTO G5 with Android 7

Same issue with some LG devices

@NepipenkoIgor
I think your last version might have fixed this issue since it's also related to the cursor.

Perhaps some of you might try with latest and see if it's fixed?

maybe @odahcam could help ?

I check with an updated version of ngx-mask and problem still persists. Device Moto G5 android 7
I have 2 Moto g5 android 7 in one it works fine and in another no

@parthnayak7448 any idea why?

Works fine on Xiaomi Mi A1 in Chrome, couldn't test any other devices yet.

@odahcam i am 褋lose and will reopen if we find all bugs

@NepipenkoIgor same bug in Samsung Internet browser in any android devices
https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser

Issue persists on up to date Samsung Galaxy S7 (SM-G930F) when demoing on https://jsdaddy.github.io/ngx-mask/

@bradenpoirier what browser are you using?

@bradenpoirier what browser are you using?

This is occurring on Samsung Internet browser

This is occurring on Samsung Internet browser

image

Can we expect a fix for this? It looks like this has been fixed on other plugins..

Having the same problem on a Nexus os 5.1.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mnagaev picture mnagaev  路  3Comments

renanBritz picture renanBritz  路  3Comments

Wisdomb33r picture Wisdomb33r  路  3Comments

ljjolic picture ljjolic  路  4Comments

ghost picture ghost  路  3Comments