Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion core/src/utils/input-shims/input-shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,20 @@ export const startInputShims = (config: Config) => {
hideCaretMap.set(componentEl, rmFn);
}

if (SCROLL_ASSIST && (!!scrollEl || !!footerEl) && scrollAssist && !scrollAssistMap.has(componentEl)) {
/**
* date/datetime-locale inputs on mobile devices show date picker
* overlays instead of keyboards. As a result, scroll assist is
* not needed. This also works around a bug in iOS <16 where
* scroll assist causes the browser to lock up. See FW-1997.
*/
const isDateInput = inputEl.type === 'date' || inputEl.type === 'datetime-local';
if (
SCROLL_ASSIST &&
!isDateInput &&
(!!scrollEl || !!footerEl) &&
scrollAssist &&
!scrollAssistMap.has(componentEl)
) {
const rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, footerEl, keyboardHeight);
scrollAssistMap.set(componentEl, rmFn);
}
Expand Down