Summary: Arrow key after undoing a DOM node delete selects the wrong element. Test Page: <p id="a"></p> <p id="b"></p> <p id="c"></p> Steps to Reproduce: 1. Inspect test page 2. Elements tab > select DOM node for p#b 3. Press Delete 4. DOM node for p#c selected 5. Undo 6. DOM node for p#b restored 7. Press arrow key up Actual: => DOM node for p#a selected Expected: => DOM node for p#b selected
<rdar://problem/46849060>
Created attachment 357716 [details] Patch
Comment on attachment 357716 [details] Patch rs=me, nice catch :) Is it possible for us to select the item before it's been inserted? I'd assume not as the indexes would get all messed up. If so, however, we may not want to move either value if the index is selected.
(In reply to Devin Rousso from comment #3) > Comment on attachment 357716 [details] > Patch > > rs=me, nice catch :) > > Is it possible for us to select the item before it's been inserted? I'd > assume not as the indexes would get all messed up. If so, however, we may > not want to move either value if the index is selected. `TreeElement.prototype.select` will return if it hasn't been attached, so it looks like we shouldn't be able to get into this state. I'll add an assert since I can't be completely sure.
Created attachment 357748 [details] Patch for landing
Comment on attachment 357748 [details] Patch for landing Clearing flags on attachment: 357748 Committed r239405: <https://trac.webkit.org/changeset/239405>
All reviewed patches have been landed. Closing bug.