(shouldOpen: boolean, animated = true, role?: string)
| 418 | */ |
| 419 | @Method() |
| 420 | setOpen(shouldOpen: boolean, animated = true, role?: string): Promise<boolean> { |
| 421 | // Blur the active element to prevent it from being kept focused inside an element that will be set with aria-hidden="true" |
| 422 | (document.activeElement as HTMLElement)?.blur(); |
| 423 | |
| 424 | return menuController._setOpen(this, shouldOpen, animated, role); |
| 425 | } |
| 426 | |
| 427 | private trapKeyboardFocus(ev: Event, doc: Document) { |
| 428 | const target = ev.target as HTMLElement | null; |