Add New Rule default value is "a" instead of "body" on Ubuntu platform
Categories
(DevTools :: Inspector: Rules, defect)
Tracking
(firefox66 affected, firefox67 affected, firefox68 affected)
People
(Reporter: vlucaci, Unassigned)
References
Details
(Keywords: regressionwindow-wanted)
Attachments
(1 file)
497.44 KB,
image/gif
|
Details |
Affected versions
- 67.0b7
- 68.0a1(2019-04-03)
- 66.0.2
Affected platforms
- Ubuntu 16.04x64
- Ubuntu 18.04x64
Steps to reproduce
- Launch FF.
- Go to any webpage.(e.g:wikipedia.com)
- Press F12 while on the page.
- Go to the second pane and click right.
- Select Add New Rule button.
Expected result
- Clicking on the Add New Rule button opens up a text field with the default "body" value in it being highlighted.
Actual result
- Clicking on the Add New Rule button opens a text field with the default "a" value in it being highlighted
*Regression range
- Will return with regression ASAP
Comment 1•5 years ago
|
||
Thanks for filing.
Looking at the gif, it doesn't look like the <body> node is selected in the inspector. Would you mind saying which node you had selected when you added the new rule?
Reporter | ||
Comment 2•5 years ago
|
||
Hello,
After further investigation I have managed to determine which element is selected when this issue occurs.
So in order to properly reproduce this:
- Go to https://en.wikipedia.org/wiki/Main_Page
- Click inspect element on the number from "5,836,689 articles in English" string near the header of the page.
- Then proceed to add a new rule via the context menu in the newly opened section.
- Notice that
<a href="/wiki/Special:Statistics" title="Special:Statistics">5,836,689</a>
is selected. - Only "a" is displayed in the new rule text field. (managed to reproduce this with any number or date that is hyperlinked).
Reporter | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Thanks Vlad for providing these steps.
Based on those, I can say that this is the expected behavior. Indeed, when adding a new rule in the Rules panel, DevTools attempts to create a selector for it that will match the currently selected element. If this element has a class or an id, it will use those too, but in the present case, the element you mentioned does not have any of those. So the selector that gets created matches the element by its tag name.
Did you expect the selector to have another value?
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 4•5 years ago
|
||
Hello Patrick,
No, not another value, but I expected that at least <a href> to be displayed.
But this is mostly a quality of life improvement so mark it as you see fit.
Comment 5•5 years ago
|
||
Thanks Vlad. Ok I'll mark it as WONTFIX for now since this is the expected behavior, and I don't think it would be a good idea to include the href
attribute in the selector. Attribute selectors are not as common as tag/id/class selectors, and I don't think it would be right for devtools to pick an attribute to use when no class or id are available.
Description
•