LibWeb: Set direction to forwards in addRange
This commit is contained in:
parent
a7953f5e09
commit
93927d8243
Notes:
github-actions[bot]
2024-10-13 07:48:03 +00:00
Author: https://github.com/Gingeh Commit: https://github.com/LadybirdBrowser/ladybird/commit/93927d8243a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1765
1 changed files with 3 additions and 0 deletions
|
@ -152,6 +152,9 @@ void Selection::add_range(JS::NonnullGCPtr<DOM::Range> range)
|
|||
|
||||
// 3. Set this's range to range by a strong reference (not by making a copy).
|
||||
set_range(range);
|
||||
|
||||
// AD-HOC: WPT selection/removeAllRanges.html and selection/addRange.htm expect this
|
||||
m_direction = Direction::Forwards;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/selection-api/#dom-selection-removerange
|
||||
|
|
Loading…
Add table
Reference in a new issue