MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / focusIn

Function focusIn

core/src/utils/input-shims/hacks/scroll-assist.ts:134–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132 * mobile Safari from adjusting the viewport.
133 */
134 const focusIn = async () => {
135 /**
136 * Scroll assist should not run again
137 * on inputs that have been manually
138 * focused inside of the scroll assist
139 * implementation.
140 */
141 if (inputEl.hasAttribute(SKIP_SCROLL_ASSIST)) {
142 inputEl.removeAttribute(SKIP_SCROLL_ASSIST);
143 return;
144 }
145 jsSetFocus(
146 componentEl,
147 inputEl,
148 contentEl,
149 footerEl,
150 keyboardHeight,
151 addScrollPadding,
152 disableClonedInput,
153 platformHeight
154 );
155
156 win?.addEventListener('ionKeyboardDidShow', keyboardShow);
157 componentEl.addEventListener('focusout', focusOut);
158 };
159
160 componentEl.addEventListener('focusin', focusIn);
161

Callers

nothing calls this directly

Calls 2

jsSetFocusFunction · 0.85
addEventListenerMethod · 0.65

Tested by

no test coverage detected