AlphaGit / ng-pattern-restrict

Allowing only certain inputs based on a regex pattern, for AngularJS
http://alphagit.github.io/ng-pattern-restrict/
MIT License
47 stars 32 forks source link

The keyboard opens in the browser Safari (IOS 8) when pressing in any place on the page #21

Closed y-u-k-o closed 9 years ago

y-u-k-o commented 9 years ago

Step to reproduce:

  1. Open page with input when you use ng-pattern-restrict on your iPhone
  2. Tap in any place on the page
  3. Keyboard opens and form filed becomes focused
  4. When you refresh the page, you can reproduce this bug again

The problem in function detectSetCaretPositionMethods(). When I have commented this function everything works fine.

AlphaGit commented 9 years ago

Fixed on cae78314fe1d6529166a472c46bf101153e6a42c.