New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 661108 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Contenteditable does not set tabindex to 0

Reported by felipe.n...@gmail.com, Nov 1 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0

Steps to reproduce the problem:
1. Open the attached file or go to http://codepen.io/anon/pen/WGVjoR
2. Look for the entry under `content-editable-div' which states "tabIndex: -1"

What is the expected behavior?
tabIndex should be 0 for tabbable elements:

From the  spec[1]:

> Modulo platform conventions, it is suggested that for the following elements, the tabindex focus flag be set:

> * [snip]
> * Editing hosts

and also[2]:

**editing host**: An editing host is a node that is an HTML element with a contenteditable attribute set to something else than the false state.

[1]: https://www.w3.org/TR/html5/editing.html#sequential-focus-navigation-and-the-tabindex-attribute
[2]: https://w3c.github.io/editing/contentEditable.html#terminology

What went wrong?
The tabIndex attribute was incorrectly set on the div with contenteditable

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: <Copy from: 'about:version'>  Channel: stable
OS Version: 10.0
Flash Version: 

There's a similar bug for Firefox[3], but IE and Edge give the correct results

[3]: https://bugzilla.mozilla.org/show_bug.cgi?id=1190261
 
test.html
1.2 KB View Download
Cc: hdodda@chromium.org
Labels: Needs-Feedback
Tested on Windows 10 using Attached html file and Given URL in comment #0 step1 in 

1.Canary M56 #56.0.2905.0

2.Chrome Stable M54 #54.0.2840.87

Attached the screenshots of both the observations. Observed different results in the given sample url and html file.

Could you please confirm us the expected behavior , so that it helps us to triage the issue better.

Thanks !
661108_canary_testfile.png
588 KB View Download
661108_url.png
602 KB View Download
661108_canary_url.png
833 KB View Download
661108_testfile.png
520 KB View Download
Hmm, not sure what's going on that's making the test file and the codepen different. It's literally the same code on both. 
The correct behavior is that `tabIndex` should be 0, like Canary on codepen, but when I submitted the report I was always seeing -1. I've just upgraded from 
54.0.2840.71 m (64-bit) to .87 m and am now seeing the same odd behavior. 

Comment 3 by tkent@chromium.org, Nov 4 2016

Components: -Blink>DOM Blink>Editing Blink>Focus
Cc: krajshree@chromium.org
Tested this issue on Windows-10 using chrome reported version #54.0.2840.87 and latest canary #56.0.2911.0.

Following are the steps followed to reproduce the issue.
------------
1. Navigated to URL: http://codepen.io/anon/pen/WGVjoR
2. Checked the entry under `content-editable-div'.
3. Observed that the value at 'content-editable-div' was 0(expected).
4. Refreshed the page and checked again the value at 'content-editable-div'.
This time the value was -1.

Attached a screencast for reference.

Reporter@ - This issue seems to be intermittent. Could you please provide more consistent repro steps, for better triaging of the issue.

Thanks....!!



661108.mp4
1.2 MB View Download
Here's a slimmed-down version of the test file which consistently shows the issue. Corresponding code pen here: http://codepen.io/anon/pen/NbPoOW

That said, the test file is very simple and should be deterministic -- the fact that the output changes on reload is itself a bug.
test-simplified.html
460 bytes View Download

Comment 6 by kochi@chromium.org, Nov 9 2016

Labels: -OS-Windows OS-All
Owner: kochi@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 7 by kochi@chromium.org, Nov 9 2016

felipe.nospam.ochoa@ thanks for the detailed report and reproduction cases.

I took a brief look at this and found that .tabIndex doesn't look into
"contenteditable" attribute directly, but uses isRootEditableElement() in
EditingUtilities.cpp, which does more complex checking.
Components: Blink>HTML>Focus
Components: -Blink>Focus
Labels: Pri-3

Comment 11 by kochi@chromium.org, Oct 17 2017

Cc: kochi@chromium.org
Owner: ----
bulk edit to remove owner=me where I'm not actively looking at.

Comment 12 by kochi@chromium.org, Oct 17 2017

Status: Available (was: Assigned)
mark it available.
Project Member

Comment 13 by sheriffbot@chromium.org, Oct 17

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -kochi@chromium.org
Labels: -Hotlist-Recharge-Cold -Needs-Feedback Hotlist-GoodFirstBug
Status: Available (was: Untriaged)
Safari correctly returns 0.

This issue is reproduced on latest chromium.
If this is issue is still valid and no one working on this issue,
I want to pick this issue up.

Sign in to add a comment