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