NEW 92672
execCommand("outdent") doesn't preserve selection correctly if <br> is added after "\n"
https://bugs.webkit.org/show_bug.cgi?id=92672
Summary execCommand("outdent") doesn't preserve selection correctly if <br> is added ...
Shezan Baig
Reported 2012-07-30 13:20:34 PDT
Created attachment 155347 [details] test case Found while debugging bug 92130. See the test case. The last character is not selected after the outdent. This happens whenever <br> is added after an inline node that ends with '\n'. The '\n' gets treated as an uncollapsable space (see RenderBlock::LineBreaker::nextLineBreak, near line 2185 when handling BR elements). This causes the endIndex in ApplyBlockElementCommand::doApply to become off by one.
Attachments
test case (211 bytes, text/html)
2012-07-30 13:20 PDT, Shezan Baig
no flags
Ahmad Saleem
Comment 1 2022-12-16 03:27:46 PST
I am able to reproduce this bug in Safari 16.2 and Safari Technology Preview 162, where in the attached test case, it does not select 'o' (last character), in case of Chrome Canary 110 and Firefox Nightly 110, it does select all text including 'o'. Just wanted to share updated testing result and I think this can be on radar as well.
Note You need to log in before you can comment on or make changes to this bug.