Open
Bug 1167917
Opened 10 years ago
Updated 4 months ago
The shared viewSourceInStyleEditor method doesn't fall back to the view-source window if style editor doesn't contain the sheet
Categories
(DevTools :: Style Editor, defect, P2)
DevTools
Style Editor
Tracking
(Not tracked)
NEW
People
(Reporter: sjakthol, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.04 KB,
application/zip
|
Details |
The method expects one of the promises to reject in order to trigger the fallback. However if style editor can't find the sheet it has been asked to select, it will just resolve immediately in StyleEditorUI.switchToSelectedSheet [1] meaning the fallback won't be triggered.
I haven't yet found a way to trigger this specific case (and don't have STR) but the code sure seems to behave incorrectly if this ever occurs.
https://dxr.mozilla.org/mozilla-central/source/browser/devtools/styleeditor/StyleEditorUI.jsm#647
Comment 1•10 years ago
|
||
Good find! This should be handled by shared/source-utils ideally
![]() |
Reporter | |
Comment 2•10 years ago
|
||
Figured out a test case for this:
1. Extract the contents of the attached zip file.
2. Open page.html inside it.
3. Open Inspector.
4. Expand the <head> element.
5. Open the context menu over 'compiled.css' link attribute.
6. Click 'Show File in Style-Editor'.
Expected results: compiled.css is opened to view-source window as it's not present in Style-Editor.
Actual results: The style editor opens but shows the wrong file (compiled.css has been replaced with original.less).
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
Updated•4 months ago
|
Blocks: dt-2025-h1-P2
You need to log in
before you can comment on or make changes to this bug.
Description
•