Open
Bug 2025533
Opened 1 month ago
Updated 1 month ago
Can't edit values in box model if text is selected in devtools
Categories
(DevTools :: Inspector, defect, P3)
DevTools
Inspector
Tracking
(Not tracked)
NEW
People
(Reporter: leo, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
509.82 KB,
video/webm
|
Details |
If text is selected elsewhere in the inspector panel in devtools, clicking on the numbers in the "Box Model" view to change them doesn't work.
Simple STR:
- open
data:text/html;charset=utf-8,<!doctype html><body><style>body {%0A%20 background: red;%0A}</style></body> - double click on "x" between the height and width values to select it
- click on the height or width value to edit them
Expected outcome:
The height or width value transforms into an input for editing
Actual outcome:
Nothing happens
Comment 1•1 month ago
|
||
Might be related to https://searchfox.org/firefox-main/rev/26c440c6196eb0b428928d995395c97101d393f4/devtools/client/shared/inplace-editor.js#264-275
element.addEventListener(trigger, function (evt) {
if (!isValidTargetForEditableItemCallback(evt.target)) {
return;
}
const win = this.ownerDocument.defaultView;
const selection = win.getSelection();
if (trigger != "click" || selection.isCollapsed) {
callback(element, evt);
}
evt.stopPropagation();
});
If correct, we should if the selection potentially overlaps the element for the inplace editor.
Severity: -- → S3
Priority: -- → P3
| Comment hidden (hide) |
| Comment hidden (hide) |
You need to log in
before you can comment on or make changes to this bug.
Description
•