MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / focusItem

Function focusItem

core/src/components/popover/utils.ts:389–396  ·  view source on GitHub ↗
(item: HTMLIonItemElement)

Source from the content-addressed store, hash-verified

387
388/** Focus the internal button of the ion-item */
389const focusItem = (item: HTMLIonItemElement) => {
390 const root = getElementRoot(item);
391 const button = root.querySelector('button');
392
393 if (button) {
394 raf(() => button.focus());
395 }
396};
397
398/**
399 * Returns `true` if `el` has been designated

Callers 1

callbackFunction · 0.85

Calls 2

getElementRootFunction · 0.90
rafFunction · 0.90

Tested by

no test coverage detected