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

@@ -670,7 +670,7 @@ class HTMLInputElement final : public TextControlElement,
already_AddRefed<nsINodeList> GetLabels();
void Select();
MOZ_CAN_RUN_SCRIPT void Select();
Nullable<uint32_t> GetSelectionStart(ErrorResult& aRv);
MOZ_CAN_RUN_SCRIPT void SetSelectionStart(const Nullable<uint32_t>& aValue,