Fix hyperlink delete when replaced with a character.
When the hyperlink is entirely selected, currently we do not remove the hyperlink, but rather do a replaceData operation in |SetCharacterDataCommand::DoApply| to insert the character that the user has typed into the hyperlink and the subsequent characters are inserted outside the hyperlink. This change deletes the hyperlink when user selects the entire hyperlink and types a single character. However, we do not replace the hyperlink if insertText operation inserts a text (more than one character) into the hyperlink when the entire link's content is selected. Test: web_tests/editing/execCommand/insert_text_hyperlink_replace.html Bug: 848506 Change-Id: Ied50697792f8d496ce59792129f5947f782da5e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2545686Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Anupam Snigdha <snianu@microsoft.com> Cr-Commit-Position: refs/heads/master@{#828592}
Showing
Please register or sign in to comment