()
| 632 | } |
| 633 | |
| 634 | cancel(): void { |
| 635 | this.setCurrentDropTarget(null); |
| 636 | this.end(); |
| 637 | if (!this.dragTarget.element.closest('[aria-hidden="true"], [inert]')) { |
| 638 | this.dragTarget.element.focus(); |
| 639 | } |
| 640 | |
| 641 | // Re-trigger focus event on active element, since it will not have received it during dragging (see cancelEvent). |
| 642 | getActiveElement()?.dispatchEvent(new FocusEvent('focusin', {bubbles: true})); |
| 643 | |
| 644 | announce(this.stringFormatter.format('dropCanceled')); |
| 645 | } |
| 646 | |
| 647 | drop(item?: DroppableItem): void { |
| 648 | if (!this.currentDropTarget) { |
no test coverage detected