You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divcontenteditableid="container">
this <acontenteditable="false">link</a> after
</div><p>1. Make the selection like "this link after|".</p><p>2. Click button to move the caret by line.</p><button>Move</button><script>document.querySelector('button').addEventListener('click',(event)=>{document.getElementById('container').focus();constselection=window.getSelection();selection.modify('move','backward','paragraphboundary');});</script>
The behavior of browsers:
Safari, Edge, and Chrome: The caret position is this link| after.
Firefox: Not support the granularity of paragraphboundary.
If we make a to be editable, the behavior of browsers:
Safari, Edge, and Chrome: The caret position is |this link after.
Firefox: Not support the granularity of paragraphboundary.
The behavior of selection.modify() when the granularity parameter is paragraphboundary should be be consistent, whether a is editable or not.
The text was updated successfully, but these errors were encountered:
The specification doesn't define the behavior of
seleciton.modify()
when the granularity parameter isparagraphboundary
.Consider this test case
The behavior of browsers:
this link| after
.paragraphboundary
.If we make
a
to be editable, the behavior of browsers:|this link after
.paragraphboundary
.The behavior of
selection.modify()
when the granularity parameter isparagraphboundary
should be be consistent, whethera
is editable or not.The text was updated successfully, but these errors were encountered: