Bug 1679461 - Use SetSelectionRange in Select(), regardless of focus state r=masayuki

SelectAll() also is no-op without a frame, so this replaces it with SetSelectionRange.

Differential Revision: https://phabricator.services.mozilla.com/D98184
This commit is contained in:
Kagami Sascha Rosylight
2020-12-02 19:27:19 +00:00
parent f91ab1a158
commit cf1b536d67
5 changed files with 30 additions and 74 deletions

View File

@@ -254,7 +254,7 @@ class HTMLTextAreaElement final : public TextControlElement,
// via bindings.
void SetCustomValidity(const nsAString& aError);
void Select();
MOZ_CAN_RUN_SCRIPT void Select();
Nullable<uint32_t> GetSelectionStart(ErrorResult& aError);
MOZ_CAN_RUN_SCRIPT void SetSelectionStart(
const Nullable<uint32_t>& aSelectionStart, ErrorResult& aError);