Hide the placeholder when caret browsing is used to navigate to a text box with placeholder set

RESOLVED INVALID

Status

()

Core
Selection
RESOLVED INVALID
8 years ago
5 years ago

People

(Reporter: Away for a while, Unassigned)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 -)

Details

(URL)

(Reporter)

Description

8 years ago
Load the test URL, turn caret browsing on, click somewhere on "test", and move the caret to the right.  The caret enters the textbox, and moves over the placeholder value.  This behavior is very strange.  I would expect that the placeholder value needs to be hidden when the caret browsing selection enters the text box.

This might be easily fixed using nsEditorInitializerOnSelection code added in bug 560665 (although I haven't tested that approach.)  I'm setting a dependency for now.
blocking2.0: ? → -
As far as I can test, caret browsing lets the user to browse text nodes. So, if you have an empty text field, it will not go into but if you have a text field with a value, it will browse the value. I guess it is looking for text nodes and when an input has a value or a placeholder it contains a text node.

But caret browsing isn't really focusing the text field so the user can't begin typing in a text field if the caret is in there with caret browsing. It has to click on it (or use tab or any regular way) which will hide the placeholder correctly.

For me, the current behavior is correct and hiding the placeholder when navigating into the input element with caret browsing sounds like a bad idea. Maybe we could prevent caret browsing to go into an input element if it shows the placeholder but that would be inconsistent.

Consistency of the behavior can be tested with:
data:text/html,<input value='foo'>bar<input placeholder=foo>bar<input>
Hardware: x86 → All
(Reporter)

Comment 2

8 years ago
Well, the problem is that we don't have a clear idea on how things _should_ work.  It looks strange to me that we can interact with text which is non-interactive like this...
(In reply to comment #2)
> Well, the problem is that we don't have a clear idea on how things _should_
> work.  It looks strange to me that we can interact with text which is
> non-interactive like this...

For me that does not sound strange. At least less strange than removing the placeholder which would let the user think he have the text field focused which is not the case. By the way, the caret doesn't let the user interact with the text if browsing a value or a placeholder text so I don't think that may let the user he can interact.

Maybe we should have the opinion of the person(s) who is/are in charge of this feature?
David Bolter might have some feedback
We know show the placeholder on focus so this bug is no longer valid.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.