-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(autocomplete): aria-expanded should be updated when panel hides (#…
…3494) * fix(autocomplete): aria-expanded should be updated when panel hides * address comments
- Loading branch information
Showing
3 changed files
with
80 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {dispatchFakeEvent} from './dispatch-events'; | ||
|
||
/** | ||
* Focuses an input, sets its value and dispatches | ||
* the `input` event, simulating the user typing. | ||
* @param value Value to be set on the input. | ||
* @param element Element onto which to set the value. | ||
*/ | ||
export function typeInElement(value: string, element: HTMLInputElement, autoFocus = true) { | ||
element.focus(); | ||
element.value = value; | ||
dispatchFakeEvent(element, 'input'); | ||
} |