Typing character should be inserted around `<a href>` when insertion point is edge of it and it's coming from outside of the link
Categories
(Core :: DOM: Editor, defect, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: olisevich, Assigned: masayuki)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(3 files)
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•5 years ago
|
||
Okay, let's change the behavior only when caret is moved from outside of <a href>
because it's too difficult to append text at end of paragraph etc when it ends with <a href>
. Feel free to file new bug if you believe that Gecko follows other browsers' behavior.
Assignee | ||
Comment 13•5 years ago
|
||
Assignee | ||
Comment 14•5 years ago
|
||
Only TypeInState
stores last caret position. So, only it can detect the
case caret is moved from outside of <a href>
element and is now at start
or end of it.
Note that this patch does not assume <a href>
has an empty text node with
another inline element. If we supported it, the loop would be more complicated
and it's really unrealistic edge case. Therefore, it's reasonable to ignore
the case.
And also this patch works with ArrowUp
/ArrowDown
/PageUp
/PageDown
cases. However, I have no idea to reject such cases. But I guess that
it does not so bad behavior for users because caret does not moved in
a text node in <a href>
.
Depends on D69479
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6f44fa3b54fc
https://hg.mozilla.org/mozilla-central/rev/eee6de1afb6a
Description
•