Fix mistakes in webdriver element send keys (#37286)

Fix mistakes from https://github.com/servo/servo/pull/37224. We should
return in the middle of send keys if the element is either file input or
non typeable form control.

Fixes:
https://github.com/servo/servo/pull/37224#pullrequestreview-2903871157

Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
Kenzie Raditya Tirtarahardja 2025-06-06 20:39:15 +08:00 committed by GitHub
parent d246e80844
commit 097bd9d87f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View file

@ -1633,7 +1633,7 @@ impl Handler {
// TODO: distinguish the not found and not focusable cases
// File input and non-typeable form control should have
// been handled in `webdriver_handler.rs`.
if wait_for_script_response(receiver)?.map_err(|error| WebDriverError::new(error, ""))? {
if !wait_for_script_response(receiver)?.map_err(|error| WebDriverError::new(error, ""))? {
return Ok(WebDriverResponse::Void);
}