Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Touch does not place cursor on input fields on Android #10301

Closed
vbraun opened this issue Jan 25, 2017 · 12 comments
Closed

Touch does not place cursor on input fields on Android #10301

vbraun opened this issue Jan 25, 2017 · 12 comments
Labels
browser: Android g3: reported The issue was reported by an internal or external product team. has: Pull Request A PR has been created to address this issue resolution: fixed ui: mobile
Milestone

Comments

@vbraun
Copy link

vbraun commented Jan 25, 2017

Actual Behavior:

  • What is the issue? *

Touch on input field does not place the cursor at different text positions on Android phone

  • What is the expected behavior?

When there is a input field with text, the cursor should be placed at the touch location.

CodePen (or steps to reproduce the issue): *

  1. Open the input demos (https://material.angularjs.org/latest/demo/input) on an Android phone.
  2. Enter some text in an input field.
  3. Touching different positions in the entered text does not place the cursor.

You can move the cursor by dragging the blue cursor location icon, but the cursor cannot be placed by touch events inside the text.

With $mdGestureProvider.skipClickHijack() this also works, i.e., touch events change the cursor location.

Angular Versions: *

  • Angular Version: 1.5.8
  • Angular Material Version: 1.1.1

Additional Information:

  • Browser Type: * Mobile chrome
  • Browser Version: * Android
  • OS: * 7

Related tickets:

@vbraun vbraun changed the title Touch does not place cursor on input fields Touch does not place cursor on input fields on Android Jan 27, 2017
@dkirsanov
Copy link

Any progress here, guys? I have the same issue.

@loggerq
Copy link

loggerq commented Apr 7, 2017

Good to see this is a known issue and others have run into it. It is a pretty impactful bug for a special p2p web app we're trying to launch.

@mkuzmych
Copy link

I have the same issue.

@niroussel
Copy link

niroussel commented Jun 7, 2017

Same problem here, reproduced with chrome developper console on Windows.

  1. Go to https://material.angularjs.org/latest/demo/input
  2. Open the developper Console
  3. Toggle device toolbar (Ctrl + Shift + M)
  4. Refresh (Ctrl + F5)

By the way, there's also a problem with textarea (all text is selected)

This is really impactful.

@PhMetzger
Copy link

Agreed, this is really impactful.

This is the kind of issue which make an entire app down. It's probably something with focus events...
I understand the effort to move to angular 4, but leaving the communauty which such an issue don't encourage to move to angular 4...

@simentesempre
Copy link

Any progress on this one? This is a blocking issue. Unfortunately this makes the whole framework useless because this is a major issue that makes any app unusable. Is there at least a workaround?
Thank you very much.

@jelbourn jelbourn added the g3: reported The issue was reported by an internal or external product team. label Jul 26, 2017
@jelbourn
Copy link
Member

Also reported by at least one Google team

crisbeto added a commit to crisbeto/material that referenced this issue Jul 27, 2017
* Fixes not being able to move the text cursor within and input on mobile.
* Fixes not being able to blur an input by tapping away on mobile.

Both of the issues were due to the click hijacking from the gesture service being too aggressive and preventing focus from shifting.

Fixes angular#10301.
Fixes angular#5365.
@crisbeto crisbeto added the has: Pull Request A PR has been created to address this issue label Jul 27, 2017
tinayuangao pushed a commit that referenced this issue Aug 3, 2017
* Fixes not being able to move the text cursor within and input on mobile.
* Fixes not being able to blur an input by tapping away on mobile.

Both of the issues were due to the click hijacking from the gesture service being too aggressive and preventing focus from shifting.

Fixes #10301.
Fixes #5365.
@gelordi
Copy link

gelordi commented Dec 19, 2017

This problem still happening on mobile

@vbraun
Copy link
Author

vbraun commented Dec 19, 2017

Its fixed for me; Do you have the right version?

@gelordi
Copy link

gelordi commented Dec 19, 2017

yes, i have 1.1.5 and it doesn't work on android/chrome/mobile.
i can't edit textarea content

@gelordi
Copy link

gelordi commented Dec 20, 2017

Can you guys check this problem?

@Splaktar
Copy link
Member

@gelordi please open a new issue with a CodePen reproduction.

@angular angular locked as resolved and limited conversation to collaborators May 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser: Android g3: reported The issue was reported by an internal or external product team. has: Pull Request A PR has been created to address this issue resolution: fixed ui: mobile
Projects
None yet
Development

No branches or pull requests