Skip to content

Commit b46b6a9

Browse files
committed
fix(picker-column): check fallback type
1 parent 9411756 commit b46b6a9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,12 @@ export class PickerColumn implements ComponentInterface {
390390
* for this use case and appears to handle Shadow DOM retargeting
391391
* more reliably in this specific iOS bug.
392392
*/
393-
if (!newActiveElement) {
394-
newActiveElement = referenceNode.elementFromPoint(centerX, centerY) as HTMLIonPickerColumnOptionElement;
393+
if (newActiveElement === undefined) {
394+
const fallbackActiveElement = referenceNode.elementFromPoint(centerX, centerY);
395+
396+
if (fallbackActiveElement?.tagName === 'ION-PICKER-COLUMN-OPTION') {
397+
newActiveElement = fallbackActiveElement as HTMLIonPickerColumnOptionElement;
398+
}
395399
}
396400

397401
if (activeEl !== undefined) {

0 commit comments

Comments
 (0)