Skip to content

Commit c1589a2

Browse files
committed
fix(picker-column): fallback to elementFromPoint for iOS 16 Shadow DOM bug
1 parent 2df6d2c commit c1589a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

core/src/components/picker-column/picker-column.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,11 @@ export class PickerColumn implements ComponentInterface {
376376
* elementsFromPoint can returns multiple elements
377377
* so find the relevant picker column option if one exists.
378378
*/
379-
const newActiveElement = elementsAtPoint.find((el) => el.tagName === 'ION-PICKER-COLUMN-OPTION');
379+
let newActiveElement = elementsAtPoint.find((el) => el.tagName === 'ION-PICKER-COLUMN-OPTION');
380+
381+
if (!newActiveElement) {
382+
newActiveElement = referenceNode.elementFromPoint(centerX, centerY) as HTMLIonPickerColumnOptionElement;
383+
}
380384

381385
if (activeEl !== undefined) {
382386
this.setPickerItemActiveState(activeEl, false);

0 commit comments

Comments
 (0)