Fixing undo after dragging text between different elements
Fixing a bug where dragging text from one input element to another, and then trying to undo this change, makes first input element's value inaccessible. In order to fix this, the root editable element associated with a `SelectionForUndoStep` is calculated at construction time. It is important to do so at construction time as the base position of the selection might be disconnected from the document, thus we might not be able to compute the root editable element. Bug: 864941 Test: Drag text from one input element to another, and then undo this change. After undoing, try to use the first input element's `value` property, and verify it has the correct value. Change-Id: Ie0016f7459bad462e67e508b64e2686c39a66fcf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2574954 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#836325}
Showing
Please register or sign in to comment