Bug 149257 - Web Inspector: Option-Up doesn't increment certain attribute values
Summary: Web Inspector: Option-Up doesn't increment certain attribute values
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-17 05:55 PDT by Nikita Vasilyev
Modified: 2015-10-21 17:14 PDT (History)
9 users (show)

See Also:


Attachments
[Animated GIF] Bug (296.96 KB, image/gif)
2015-09-17 05:55 PDT, Nikita Vasilyev
no flags Details
Patch (6.12 KB, patch)
2015-09-17 21:50 PDT, Devin Rousso
bburg: review+
Details | Formatted Diff | Diff
Patch (5.87 KB, patch)
2015-10-21 16:19 PDT, Devin Rousso
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 2015-09-17 05:55:47 PDT
Created attachment 261386 [details]
[Animated GIF] Bug

Steps:
1. Go to http://n12v.dev/2-way-data-binding/
2. Inspect the first video, <video width="216" height="48" poster="/2-way-data-binding/temperature-converter.png">
3. Double click on "216"
4. Press Option-Up

Expected:
Value changes to "217", cursor stays where it was.

Actual:
Value changes to "217", cursor stays jumps to the beginning of the text field.

An error is thrown:

    IndexSizeError: DOM Exception 1: Index or size was negative, or greater than the allowed value.
      setEnd - EditingSupport.js:267
      handleEditingResult - EditingSupport.js:267
      keyDownEventListener - EditingSupport.js:289

Note that modifying height on the very same element works as expected. Although, it causes the DOM path bar to blink.
Comment 1 Radar WebKit Bug Importer 2015-09-17 05:56:10 PDT
<rdar://problem/22737768>
Comment 2 Devin Rousso 2015-09-17 21:50:08 PDT
Created attachment 261486 [details]
Patch
Comment 3 Nikita Vasilyev 2015-10-08 22:28:29 PDT
The patch works as expected and looks good to me!

In long term, we probably want to use CodeMirror for HTML elements & attributes editing.

(In reply to comment #0)
> Created attachment 261386 [details]
> [Animated GIF] Bug
> 
> Steps:
> 1. Go to http://n12v.dev/2-way-data-binding/

http://n12v.com/2-way-data-binding/
Comment 4 Blaze Burg 2015-10-18 15:57:43 PDT
Comment on attachment 261486 [details]
Patch

r=me

This will need to be rebased before landing, it's a few weeks behind.
Comment 5 Devin Rousso 2015-10-21 16:19:38 PDT
Created attachment 263758 [details]
Patch

Sorry for the delay.  Just got the build working on my laptop again :)
Comment 6 WebKit Commit Bot 2015-10-21 17:14:11 PDT
Comment on attachment 263758 [details]
Patch

Clearing flags on attachment: 263758

Committed r191416: <http://trac.webkit.org/changeset/191416>
Comment 7 WebKit Commit Bot 2015-10-21 17:14:16 PDT
All reviewed patches have been landed.  Closing bug.