Open
Bug 1350185
Opened 9 years ago
Updated 3 years ago
Inspector doesn't select the node when opened from context menu (sometimes)
Categories
(DevTools :: Inspector, defect, P2)
Tracking
(firefox52 unaffected, firefox-esr52 unaffected, firefox53 wontfix, firefox54 fix-optional, firefox56 wontfix, firefox57 fix-optional)
NEW
| Tracking | Status | |
|---|---|---|
| firefox52 | --- | unaffected |
| firefox-esr52 | --- | unaffected |
| firefox53 | --- | wontfix |
| firefox54 | --- | fix-optional |
| firefox56 | --- | wontfix |
| firefox57 | --- | fix-optional |
People
(Reporter: 684sigma, Unassigned)
References
Details
(Keywords: regression)
I have a problem with Firefox Beta 53. It also happens in Nightly 55. Doesn't happen in Beta 52.
Sometimes when I inspect elements using context menu, inspector doesn't select the node.
It happens unpredictably, however, I noticed one specific scenario when it happens
1. Open https://codemirror.net/demo/folding.html
2. Right-click on word "Demonstration", click "Inspect element"
Result: Inspector opens, but no node selected
Expected: The node should be selected
Has STR: --- → yes
Keywords: regression
Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=1a3194836cb4c3da6ba3a9742a2d25cf26669b55&tochange=90b691bf09f5cc4fe7d0c6445fcf5afa2c34eeee
Blocks: 1154645
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
status-firefox52:
--- → unaffected
status-firefox53:
--- → affected
status-firefox54:
--- → affected
status-firefox55:
--- → affected
status-firefox-esr52:
--- → unaffected
Ever confirmed: true
Comment 2•9 years ago
|
||
Too late for a fix for 53, as we are heading into the last week of the beta 53 cycle and no one is assigned.
Comment 3•9 years ago
|
||
Interesting, definitely seem related to bug 1154645.
When right-clicking, we get the following message in the browser console:
unsafe/forbidden CPOW usage css-logic.js:395:34
Alex: mind taking a look at what could cause this?
Flags: needinfo?(poirot.alex)
Priority: -- → P2
Comment 4•9 years ago
|
||
That's related to page CSS behavior and this code:
http://searchfox.org/mozilla-central/source/toolkit/modules/css-selector.js#79-103
When right clicking on codemirror element, .CodeMirror-focused class is set on the editor <div>,
then we craft a selector based on that:
.CodeMirror-focused > div:nth-child(6) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(5) > div:nth-child(2) > pre:nth-child(2)
It then fails as the inspector takes the focus and codemirror <div> losses its .CodeMirror-focused class.
I'm wondering if we should remove this code:
http://searchfox.org/mozilla-central/source/toolkit/modules/css-selector.js#79-103
And ignore class name completely, or only use tag-name:nth-child(x) selectors which sounds like the most stateless ones.
Flags: needinfo?(poirot.alex)
Comment 5•9 years ago
|
||
(In reply to Alexandre Poirot [:ochameau] from comment #4)
> I'm wondering if we should remove this code:
> http://searchfox.org/mozilla-central/source/toolkit/modules/css-selector.
> js#79-103
> And ignore class name completely, or only use tag-name:nth-child(x)
> selectors which sounds like the most stateless ones.
For the purpose of selecting an element with the context-menu, yes, I think that would be fine. But we should keep this code around for other use cases (for instance, you can right-click on nodes in the inspector and copy their CSS selectors from there. For this use case, we do want to keep classes).
Updated•9 years ago
|
status-firefox56:
--- → wontfix
status-firefox57:
--- → fix-optional
Updated•8 years ago
|
Product: Firefox → DevTools
Updated•3 years ago
|
Severity: normal → S3
status-firefox55:
wontfix → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•