File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed 
core/src/components/picker-column Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,23 @@ 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+         /** 
382+          * TODO(FW-6594): Remove this workaround when iOS 16 is no longer 
383+          * supported. 
384+          * 
385+          * If `elementsFromPoint` failed to find the active element (a known 
386+          * issue on iOS 16 when elements are in a Shadow DOM and the 
387+          * referenceNode is the document), a fallback to `elementFromPoint` 
388+          * is used. While `elementsFromPoint` returns all elements, 
389+          * `elementFromPoint` returns only the top-most, which is sufficient 
390+          * for this use case and appears to handle Shadow DOM retargeting 
391+          * more reliably in this specific iOS bug. 
392+          */ 
393+         if  ( ! newActiveElement )  { 
394+           newActiveElement  =  referenceNode . elementFromPoint ( centerX ,  centerY )  as  HTMLIonPickerColumnOptionElement ; 
395+         } 
380396
381397        if  ( activeEl  !==  undefined )  { 
382398          this . setPickerItemActiveState ( activeEl ,  false ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments