Bug 160986 - REGRESSION (r201454): Web Inspector: Text caret isn't visible when editing an attribute
Summary: REGRESSION (r201454): Web Inspector: Text caret isn't visible when editing an...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P1 Critical
Assignee: Nikita Vasilyev
URL:
Keywords: GoodFirstBug, InRadar
Depends on:
Blocks:
 
Reported: 2016-08-18 17:11 PDT by Nikita Vasilyev
Modified: 2016-09-01 12:34 PDT (History)
8 users (show)

See Also:


Attachments
[Animated GIF] Bug (128.21 KB, image/gif)
2016-08-18 17:13 PDT, Nikita Vasilyev
no flags Details
WIP (559 bytes, patch)
2016-08-31 17:08 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
Patch (1.35 KB, patch)
2016-08-31 17:22 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
[Animated GIF] With patch applied (204.30 KB, image/gif)
2016-08-31 17:27 PDT, Nikita Vasilyev
no flags Details
[Animated GIF] With patch applied, text caret is visible (106.71 KB, image/gif)
2016-09-01 11:40 PDT, Nikita Vasilyev
no flags Details
Patch (1.52 KB, patch)
2016-09-01 11:41 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2016-08-18 17:11:42 PDT
Steps:
1. Open http://webkit.org
2. In Web Inspector, open Elements tab
3. Double-click on "class=..."

Expected:
Text caret is visible.

Actual:
Text caret is NOT visible.
Comment 1 Radar WebKit Bug Importer 2016-08-18 17:11:58 PDT
<rdar://problem/27916207>
Comment 2 Nikita Vasilyev 2016-08-18 17:13:48 PDT
Created attachment 286420 [details]
[Animated GIF] Bug
Comment 3 Devin Rousso 2016-08-31 15:06:36 PDT
I think this was partially caused by <webkit.org/b/157468> (r279944).  The z-index change of the `.tree-outline.dom li .selection-area` element, as well as the background-color of `.editing`, seem to prevent the text caret from being visible (it is shown, but it is below the background of `.tree-outline.dom li .selection-area` AND `.editing`).  Might also be an HTML issue.
Comment 4 Nikita Vasilyev 2016-08-31 16:56:33 PDT
This was indeed broken by http://trac.webkit.org/changeset/201454.
Comment 5 Nikita Vasilyev 2016-08-31 17:08:11 PDT
Created attachment 287572 [details]
WIP
Comment 6 Nikita Vasilyev 2016-08-31 17:22:41 PDT
Created attachment 287574 [details]
Patch
Comment 7 Nikita Vasilyev 2016-08-31 17:27:12 PDT
Created attachment 287577 [details]
[Animated GIF] With patch applied

This patch has a side-effect. The nesting indicator now overlays the selected element. I personally don't mind that.
Comment 8 Devin Rousso 2016-08-31 17:33:42 PDT
Comment on attachment 287574 [details]
Patch

Somewhat unrelated, but I think that we should make the editing cursor a text-bar, not just a regular cursor.  You can change this in Editing.css:

.editing, .editing * {
    color: black !important;
    text-decoration: none !important;
    cursor: text !important;
}

View in context: https://bugs.webkit.org/attachment.cgi?id=287574&action=review

> Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css:68
>      z-index: 20;

If you are removing `position: relative;` you should remove the z-index.  It is ignored if the position is static.
Comment 9 Brian Burg 2016-09-01 10:54:22 PDT
Comment on attachment 287577 [details]
[Animated GIF] With patch applied

The "after" gif doesn't show the text caret. Did you forget?
Comment 10 Nikita Vasilyev 2016-09-01 11:40:37 PDT
Created attachment 287644 [details]
[Animated GIF] With patch applied, text caret is visible
Comment 11 Nikita Vasilyev 2016-09-01 11:41:40 PDT
Created attachment 287645 [details]
Patch
Comment 12 Brian Burg 2016-09-01 12:13:35 PDT
Comment on attachment 287645 [details]
Patch

r=me
Comment 13 WebKit Commit Bot 2016-09-01 12:34:39 PDT
Comment on attachment 287645 [details]
Patch

Clearing flags on attachment: 287645

Committed r205307: <http://trac.webkit.org/changeset/205307>
Comment 14 WebKit Commit Bot 2016-09-01 12:34:43 PDT
All reviewed patches have been landed.  Closing bug.