fix(svg): allow click events to Power BI host for visual acivation#124
Open
ansaganie wants to merge 2 commits into
Open
fix(svg): allow click events to Power BI host for visual acivation#124ansaganie wants to merge 2 commits into
ansaganie wants to merge 2 commits into
Conversation
…tivation Remove stopPropagation/stopImmediatePropagation from clickComponentHandler so that click events can bubble up to the Power BI host container, which is how the host detects that a visual should be activated and its settings shown in the format pane. To prevent the pre-existing double-dispatch problem (child element click bubbling to the SVG root and triggering a second onClick dispatch that cleared the selection), add a target===currentTarget guard in bindEvents so the SVG click handler only fires for direct background clicks, not for clicks that bubbled from child elements. Also fix visualBuilder.ts: pass this.element (HTMLElement) directly to PowerKPI constructor instead of this.element[0] (which is undefined) so unit tests that query the DOM actually work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow click events to bubble to Power BI host for visual activation