Closes the menu and all parent menus.
()
| 458 | |
| 459 | /** Closes the menu and all parent menus. */ |
| 460 | closeAll() { |
| 461 | const root = this.root(); |
| 462 | |
| 463 | if (root instanceof MenuTriggerPattern) { |
| 464 | root.close({refocus: true}); |
| 465 | } |
| 466 | |
| 467 | if (root instanceof MenuBarPattern) { |
| 468 | root.close(); |
| 469 | } |
| 470 | |
| 471 | if (root instanceof MenuPattern) { |
| 472 | root.inputs.activeItem()?.close({refocus: true}); |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | /** Clears any open or close timeouts for sub-menus. */ |
| 477 | _clearTimeouts() { |
no test coverage detected