question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Buggy on Mobile devices

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:26

github_iconTop GitHub Comments

2reactions
Dok11commented, Feb 15, 2019

This is occurring on Samsung Internet browser

image

2reactions
suhelkhan1commented, Mar 8, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android users, Google has this fix to find a buggy app on your ...
Your Android phone been working erratically since the last few days? Goes into a sudden freeze, restarts on its own, crashes or is...
Read more >
iPhones are buggy, but Android handsets have more reliability ...
Android devices are far less reliable than iPhones. Why? Why are iPhone buggy but more reliable than Android devices? It feels to me...
Read more >
Fix a buggy app, free up storage and more on your Android ...
The first possible fix is to just restart your phone. That may clear out a temporary hangup. Also check that your Android operating...
Read more >
How to fix common smartphone problems - Popular Science
Most smartphone problems fall into just a few categories, like low battery life or buggy apps. Here's how to solve the most annoying...
Read more >
What is the most stable / least buggy android experience?
Hi all, I love battery life and a good camera experience in a phone. I have had both with my iPhone 11 Pro...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found