Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Revert stopping propagation of Popover clicks #7981

Merged
merged 2 commits into from
Apr 21, 2023

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Apr 21, 2023

First, a background. 😂

So, this PR reverts stopping propagation since it caused more problems.

Instead, this fixes the original #7840 issue in a different way. Rather than the entire asset tile be clickable (including the twirldown), just wrap the clickable bits in a new div, attach the handlers to that, and let the twirldown sit on top.

Visually:

Tile (click handlers here)
    Dropdown
    Image
    Filename

becomes

Tile
    Dropdown
    Wrapper (click handlers here)
        Image
        Filename

Now since the twirldown is not a child, when you click it, the event won't bubble up causing the asset to be selected.

@jasonvarga jasonvarga added the 4.0 label Apr 21, 2023
@what-the-diff
Copy link

what-the-diff bot commented Apr 21, 2023

PR Summary

  • Removed stopPropagation prop from Popover.vue component
    In the Popover.vue file, the unnecessary stopPropagation prop was removed to simplify the code.
  • Updated click event listener in Browser.vue
    The click event listener on an asset thumbnail in the Browser.vue file now uses the .stop modifier for better event handling.
  • Simplified popovers in Filters.vue
    In Filters.vue, two popovers were updated by removing the :stop-propagation="false" attribute, allowing it to use the default value instead.
  • Restored stopPropagation default value in SetPicker
    The stopPropagation value for SetPicker in the replicator fieldtype was set back to its default value of false, correcting a previous modification.

@jasonvarga jasonvarga merged commit 337c2ff into master Apr 21, 2023
@jasonvarga jasonvarga deleted the popover-propagation branch April 21, 2023 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant