Skip to content

Commit

Permalink
[BUGFIX] Stop event propagation when clicking icon in page tree
Browse files Browse the repository at this point in the history
With #103197, a loading indicator was added to the context menus.
However, due to the nature how the context menu component registers
itself, we run into conflicting event handling. We have to silent any
subsequent handlers on the same event, therefore the event propagation
is immediately stopped.

This aligns the event propagation behavior with the modernized tree in
TYPO3 v13.

Resolves: #103379
Related: #103197
Releases: 12.4
Change-Id: I87ae7ac815d3271788a164258ab2208fe5e57e6e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83441
Tested-by: Sven Juergens <typo3@blue-side.de>
Reviewed-by: Benjamin Franzke <ben@bnf.dev>
Tested-by: Andreas Kienast <a.fernandez@scripting-base.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Andreas Kienast <a.fernandez@scripting-base.de>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Benjamin Franzke <ben@bnf.dev>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
  • Loading branch information
andreaskienast committed Mar 12, 2024
1 parent 3451b50 commit 363f6fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Build/Sources/TypeScript/backend/svg-tree.ts
Expand Up @@ -1081,6 +1081,7 @@ export class SvgTree extends LitElement {
* Event handler for clicking on a node's icon
*/
protected clickOnIcon(evt: MouseEvent, node: TreeNode): void {
evt.stopImmediatePropagation();
this.dispatchEvent(new CustomEvent('typo3:svg-tree:node-context', { detail: { node: node, originalEvent: evt } }));
}

Expand Down

0 comments on commit 363f6fa

Please sign in to comment.