Bug 182560
| Summary: | Web Inspector: Styles: text caret disappears after pressing arrow down for certain numeric values | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | inspector-bugzilla-changes, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
Nikita Vasilyev
Steps:
1. Add "border: 10px solid" CSS property.
2. Place text caret just before "10px".
3. Press Arrow Up key once.
4. Press Arrow Down key once.
5. Press Arrow Down key again.
Expected:
border: 9px solid
Actual:
border: 10px solid
Text caret disappears on the second press of arrow down key.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/37298586>
Nikita Vasilyev
Removing these lines fixes the bug:
// This check is for the situation when the cursor is in the space between the
// opening quote of the attribute and the first character. In that spot, the
// commonAncestorContainer is actually the entire attribute node since `="` is
// added as a simple text node. Since the opening quote is immediately before
// the attribute, the node for that attribute must be the next sibling and the
// text of the attribute's value must be the first child of that sibling.
if (container.parentNode.classList.contains("editing") && container.nextSibling) {
container = container.nextSibling.firstChild;
startOffset = 0;
}
However, these lines were added in 2015 to fix Bug 149257 - Web Inspector: Option-Up doesn't increment certain attribute values.