mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Clear textarea with empty string for WebDriver
The WebDriver clear handler for textarea elements sets the raw value to child_text_content() instead of an empty string. This is a copy-paste from the adjacent reset handler, which correctly uses child_text_content() per its own spec. The clear spec says "set the raw value of element to an empty string".
This commit is contained in:
committed by
Tim Flynn
parent
4a5746db10
commit
56287ca90f
Notes:
github-actions[bot]
2026-02-13 20:30:29 +00:00
Author: https://github.com/Praise-Garfield Commit: https://github.com/LadybirdBrowser/ladybird/commit/56287ca90fb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7929 Reviewed-by: https://github.com/gmta
@@ -127,7 +127,7 @@ void HTMLTextAreaElement::clear_algorithm()
|
||||
m_dirty_value = false;
|
||||
|
||||
// and set the raw value of element to an empty string.
|
||||
set_raw_value(child_text_content());
|
||||
set_raw_value({});
|
||||
|
||||
// Unlike their associated reset algorithms, changes made to form controls as part of these algorithms do count as
|
||||
// changes caused by the user (and thus, e.g. do cause input events to fire).
|
||||
|
||||
Reference in New Issue
Block a user