Closed
Bug 1192486
Opened 8 years ago
Closed 7 years ago
[style editor] Selectors, rule names and values are added to Wrong stylesheet if you click autocomplete suggestion in popup
Categories
(DevTools :: Style Editor, defect)
DevTools
Style Editor
Tracking
(firefox42 affected, firefox45 fixed)
RESOLVED
FIXED
Firefox 45
People
(Reporter: arni2033, Assigned: tromey)
References
Details
Attachments
(2 files, 1 obsolete file)
363.53 KB,
video/webm
|
Details | |
3.31 KB,
patch
|
tromey
:
review+
|
Details | Diff | Splinter Review |
STR: (Win7, Nightly 42.0a1 (2015-08-07)) 1. Open data:text/html,<body><style>body{background:tan;} 2. Open Devtools->Style Editor. Press "New" 3. Start typing "bo" [autocomplete popup "body" will appear] 4. Click that autocomplete item with left mouse button RESULT: In just created stylesheet I still see "bo". But if "body" was added to the top of 1st (background) stylesheet. Same applies for names and values of rules EXPECTATIONS: Autocompleted string should be in 2nd (active) stylesheed.
Summary: Selectors, rule names and values are added to Wrong stylesheet if you click autocomplete suggestion in popup → [style editor] Selectors, rule names and values are added to Wrong stylesheet if you click autocomplete suggestion in popup
Assignee | ||
Comment 1•8 years ago
|
||
I think the bug here is that AutocompletePopup reuses elements here: https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/autocomplete-popup.js#56 ... but it attaches listeners for each style sheet here: https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/autocomplete-popup.js#106 ... and doesn't try to filter the click based on which style sheet is selected; so the click callback is called for the first style sheet.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Assignee | ||
Comment 3•8 years ago
|
||
Comment on attachment 8680910 [details] [diff] [review] make completion work in any selected style editor This fixes completion by giving each AutocompletePopup its own name. I didn't see anything readily available to use as a name, so I just added a counter.
Attachment #8680910 -
Flags: review?(mratcliffe)
Comment on attachment 8680910 [details] [diff] [review] make completion work in any selected style editor Review of attachment 8680910 [details] [diff] [review]: ----------------------------------------------------------------- Sorry I took so long to get to this, especially as it is such a simple change.
Attachment #8680910 -
Flags: review?(mratcliffe) → review+
Assignee | ||
Updated•8 years ago
|
Attachment #8686140 -
Flags: review+
Assignee | ||
Comment 6•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9b87346a4a97
Assignee | ||
Comment 7•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5ba8cea10878
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9bd35d40fff9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Comment 10•7 years ago
|
||
I have reproduced this bug with Firefox Nightly 42.0a1 (Build ID: 20150807030210) on windows 8.1 64-bit with the instructions from comment 0. Verified as fixed with latest Firefox Developer edition 45.0a2 (Build ID: 20160119004010) Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
QA Whiteboard: [bugday-20160120]
Updated•5 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•