-
Notifications
You must be signed in to change notification settings - Fork 27.5k
prevents unwanted opening of the soft keyboard #2989
Conversation
Ghost clicks are busted but the corresponding form elements are still focused. This means that for example on smartphones the soft keyboard will be opened. This pull request prevents the unwanted opening of the soft keyboard.
PR Checklist (Minor Feature)
|
@JanLaussmann - thanks for this PR. It will need a bit more before we can merge it. Can you first sign the CLA, then take a look at our commit message guidelines. Also we will need a unit test to verify this change. |
@petebacondarwin thanks for you reply. I just signed the Contributor License Agreement (CLA). For cross reference my real name is "Jan Laußmann". I will provide a correct commit message and a unit test in the following days. |
@JanLaussmann - Hi, did you get time to fix up the commits and provide tests? Thanks. |
@petebacondarwin I don't know how a test for this pull request could be written because the wrong behavior is very specific to real touch devices and I don't know how I could emulate the problem in a test without a real hardware touch device. But there are several other people with the same problem who would benefit from this pull request, see the discussion about "ghost clicks" here https://groups.google.com/d/msg/angular/NpgXfFh7nA0/ZpyYQIiQ_I0J Also this pull request fixes issue #2810 Maby the ngMobile author @shepheb could provide some help? |
MERGED |
This PR makes ngMobile unusable for me. The problem is that if the text input or textarea is within an element that has ng-click attached to it, it will never get focused. I'm currently testing on iPad with iOS 6.0. All of the forms in my app are no longer getting focus because they are within an ng-click area. I think we need to use a different approach. For what it's worth I have found that using fastclick instead of ngMobile altogether solves the ghostclick problem I reported in #2810. I mention there that they addressed the issue in this PR: ftlabs/fastclick#27 |
I would like to argue that angular should remove the
So I am wondering why angular doesn't just adopt or just recommend the use of fastclick? @matsko @IgorMinar @shepheb I'm cc-ing you on this because I think this is a serious problem. As a mobile developer who uses angular to write mobile apps, I am unable to use |
Ghost clicks are busted but the corresponding form elements are still focused. This means that for example on smartphones the soft keyboard will be opened. This pull request prevents the unwanted opening of the soft keyboard.
@damrbaby My early experiments with combining fastclick with Angular were a failure. That was why I started out writing the custom I'm prepared to strip the |
@shepheb any update on this? I will go ahead and submit a PR that removes the |
Anyone here having a FastClick+angular integration ? |
+1 on removing the |
Before using ngTouch I was using FastClick and it was working OK out of the box.
+1 on removing the ngClick override... |
+1 Here as well. This is not an uncommon use case as you have things like a hamburger menu button with child links. |
Form element focus should not be prevented by ng-click. The issue was introduced by angular#2989, and happens on mobile browsers that support touch events. Plunker to demonstrate the issue: http://embed.plnkr.co/CxeuWocoPE70vzrevrIi Closes angular#4030, angular#6432
Form element focus should not be prevented by ng-click. The issue was introduced by angular#2989, and happens on mobile browsers that support touch events. Plunker to demonstrate the issue: http://embed.plnkr.co/CxeuWocoPE70vzrevrIi Closes angular#4030, angular#6432
Ghost clicks are busted but the corresponding form elements are still focused. This means that for example on smartphones the soft keyboard will be opened. This pull request prevents the unwanted opening of the soft keyboard.