This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mobile-ng-click): prevent unwanted opening of the soft keyboard
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.
- Loading branch information
1 parent
3fdbe81
commit 0bbd20f
Showing
2 changed files
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0bbd20f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very breaking change, please see my comments here: #2989 (comment)
0bbd20f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second that this is a breaking change; or if you prefer diplomacy, a grossly inflexible, opinionated choice. If the developer wants
ng-click
not to focus a clicked focusable element (whether that element is the one withng-click
or any ancestor of it, which is not uncommon at all and includes most dialog directives) we're well-prepared if not even accustomed to doing just that with$event.target
or various other means. But, that should be up to the developer, notngTouch
; and it certainly shouldn't be something that silently breaks all inputs in dialogs (for instance) a only on mobile devices, and b only when withngTouch
is on the module. That's how you hurt adoption.0bbd20f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing us grief as well. Any input element in a parent container which has an ng-click directive is now unclickable on mobile.
0bbd20f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the above commenter: this is causing us grief. I cannot use ngTouch in my app because of this behavior, as it breaks my app on mobile.
0bbd20f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1