Bug 137467

Summary: Web Inspector: Cursor and scroll view jumps around when modifying styles
Product: WebKit Reporter: Jerrold Poh <jerrold.poh>
Component: Web InspectorAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: bugzilla, commit-queue, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: Other   
Attachments:
Description Flags
Shows position of dock and window of when bug can be replicated
none
Patch
none
Patch none

Description Jerrold Poh 2014-10-06 15:37:56 PDT
Created attachment 239362 [details]
Shows position of dock and window of when bug can be replicated

Seen on OS X Yosemite GM (14A379a), Safari 8 (10600.1.25).

To replicate, load the web inspector for a page and inspect an element.  Ensure the web inspector is docked.

- When enabling / disabling a style, scroll area jumps around
- When adding or modifying a style, as you start typing sometimes characters are "skipped".  E.g. typing "margin-top" will sometimes result in "marin-top" as characters are dropped 
- Cursor also sometimes jumps to start / end of line sporadically when editing
- And scroll view of dock will scroll up and down too

Could be related to the autocomplete feature, as I notice if I type slowly and use the auto complete, I can sometimes prevent the cursor jumps / skips

See attachment which shows position of dock and window of when bug can be replicated.
Comment 1 Radar WebKit Bug Importer 2014-10-06 15:38:35 PDT
<rdar://problem/18561845>
Comment 2 Timothy Hatcher 2014-11-06 14:56:32 PST
This turns out to be a CodeMirror bug. I have a fix. I also filed a bug for CodeMirror: https://github.com/codemirror/CodeMirror/issues/2912
Comment 3 Timothy Hatcher 2014-11-06 14:59:39 PST
Created attachment 241133 [details]
Patch
Comment 4 Timothy Hatcher 2014-11-07 10:31:45 PST
Created attachment 241190 [details]
Patch
Comment 5 Joseph Pecoraro 2014-11-07 13:24:07 PST
Comment on attachment 241190 [details]
Patch

r=me. Never thought I'd review a patch that used the word "blinky" in it.
Comment 6 WebKit Commit Bot 2014-11-07 14:01:53 PST
Comment on attachment 241190 [details]
Patch

Clearing flags on attachment: 241190

Committed r175763: <http://trac.webkit.org/changeset/175763>
Comment 7 WebKit Commit Bot 2014-11-07 14:01:56 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Michael Bailey 2015-01-07 12:00:08 PST
I’m still seeing this in both Safari 8.0.2 (10600.2.5) and WebKit r178028. Screen recording of the issue, taken with WebKit r178028: http://roguewhaler.net/files/web-inspector-jumping.mov

Should I file a new bug for this?
Comment 9 Timothy Hatcher 2015-01-07 12:24:17 PST
Yes, please do.
Comment 10 Michael Bailey 2015-01-07 12:40:47 PST
Submitted: https://bugs.webkit.org/show_bug.cgi?id=140193