File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,6 @@ class MenuBase extends Component<MenuProps, MenuState> {
183183 ! ( event . target as HTMLElement ) . classList . contains ( breadcrumbStyles . breadcrumbLink )
184184 ) {
185185 this . activeMenu = ( event . target as HTMLElement ) . closest ( `.${ styles . menu } ` ) ;
186- this . setState ( { disableHover : true } ) ;
187186 }
188187
189188 if ( ( event . target as HTMLElement ) . tagName === 'INPUT' ) {
Original file line number Diff line number Diff line change @@ -210,10 +210,10 @@ const MenuItemBase: React.FunctionComponent<MenuItemProps> = ({
210210 if ( flyoutTarget ) {
211211 if ( flyoutVisible ) {
212212 const flyoutMenu = ( flyoutTarget as HTMLElement ) . nextElementSibling ;
213- const flyoutItems = Array . from ( flyoutMenu . getElementsByTagName ( 'UL' ) [ 0 ] . children ) . filter (
213+ const flyoutItems = Array . from ( flyoutMenu ? .getElementsByTagName ( 'UL' ) [ 0 ] ? .children || [ ] ) . filter (
214214 ( el ) => ! ( el . classList . contains ( 'pf-m-disabled' ) || el . classList . contains ( styles . divider ) )
215215 ) ;
216- ( flyoutItems [ 0 ] . firstChild as HTMLElement ) . focus ( ) ;
216+ ( flyoutItems [ 0 ] ? .firstChild as HTMLElement ) ? .focus ( ) ;
217217 } else {
218218 flyoutTarget . focus ( ) ;
219219 }
You can’t perform that action at this time.
0 commit comments