Closed
Bug 1153635
Opened 11 years ago
Closed 11 years ago
Clicking text node in inspector does not properly focus it
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(firefox40 fixed)
RESOLVED
FIXED
Firefox 40
| Tracking | Status | |
|---|---|---|
| firefox40 | --- | fixed |
People
(Reporter: jruderman, Assigned: pbro)
References
Details
(Whiteboard: [polish-backlog][difficulty=easy])
Attachments
(1 file, 1 obsolete file)
Depending on how I select a text node in the Inspector, pressing Enter may or may not let me edit it.
Sad case:
1. Click text node Line is highlighted
2. Press Enter Nothing happens
| Assignee | ||
Comment 1•11 years ago
|
||
Right, good catch, if you click on the "line" of the node in the inspector, but not on the text itself, the node becomes selected, but the focus doesn't move there.
Same with element nodes, just selecting the line doesn't focus the tagname, which means that if you press TAB, the focus will be moved to the first focusable node in the markup-view: <html>, which might make the view scroll up.
So, we should auto-focus the first focusable element in the line, when a node is selected in the markup-view.
For info, this already appears to work when you select nodes by the keyboard (moving with the arrow keys).
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: [devedition-40][difficulty=easy]
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → pbrosset
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•11 years ago
|
||
/r/7299 - Bug 1153635 - Focus first focusable element in MarkupContainer when line is clicked; r=bgrins
Pull down this commit:
hg pull -r 51006c062dd1e76c7a5f4157223634b57fef5657 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8594741 -
Flags: review?(bgrinstead)
| Assignee | ||
Comment 3•11 years ago
|
||
For info: moving the focus programmatically from a mousedown event handler always fails because the mousedown event then bubbles up to the body which reclaims the focus.
stopPropagation isn't enough to stop this, preventDefault has to be used too (which is what I did).
Another way would have been to refocus the element on mouseup, but that would be a bit weird. The other thing I could have done was add a setImmediate around the this.markup.navigate(this) to make sure the focus is given after the body has taken it, but that looked more like a hack to me.
Updated•11 years ago
|
Attachment #8594741 -
Flags: review?(bgrinstead) → review+
Comment 4•11 years ago
|
||
Comment on attachment 8594741 [details]
MozReview Request: bz://1153635/pbrosset
https://reviewboard.mozilla.org/r/7297/#review6057
Looks good to me
| Assignee | ||
Comment 5•11 years ago
|
||
| Assignee | ||
Comment 6•11 years ago
|
||
There are some unrelated failures on Windows, but they aren't related to this patch, I see them on other try builds as well.
Pushed to fx-team: https://hg.mozilla.org/integration/fx-team/rev/e622988c2f98
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Updated•11 years ago
|
QA Whiteboard: [good first verify]
Comment 8•11 years ago
|
||
Tested on Firefox Nightly 40.0a1 (2015-04-12) as per said in comment 0 and on Windows 7 x32.
Verified as fixed with Firefox Aurora 40.0a2 (Build ID: 20150526004004)
Mozilla/5.0 (Windows NT 6.1; rv:40.0) Gecko/20100101 Firefox/40.0
[bugday-20150527]
| Assignee | ||
Comment 9•11 years ago
|
||
Attachment #8594741 -
Attachment is obsolete: true
Attachment #8620028 -
Flags: review+
| Assignee | ||
Comment 10•11 years ago
|
||
Updated•11 years ago
|
Whiteboard: [devedition-40][difficulty=easy] → [polish-backlog][difficulty=easy]
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•