Skip to content

Commit

Permalink
[4.x] Popovers now stop click propagation (#7844)
Browse files Browse the repository at this point in the history
Popovers now stop click propagation. Fixes #7840.
  • Loading branch information
jackmcdade authored Apr 5, 2023
1 parent c13fbc1 commit fd0900f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion resources/js/components/Popover.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<div :class="{'popover-open': isOpen}" @mouseleave="leave">
<div @click="toggle" ref="trigger" aria-haspopup="true" :aria-expanded="isOpen" v-if="$scopedSlots.default">

<div @click.stop="toggle" ref="trigger" aria-haspopup="true" :aria-expanded="isOpen" v-if="$scopedSlots.default">
<slot name="trigger"></slot>
</div>

Expand Down
11 changes: 9 additions & 2 deletions resources/js/components/assets/Browser/Browser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,16 @@
</dropdown-list>
</div>
<!-- Assets -->
<button class="asset-tile outline-none group relative" v-for="(asset, index) in assets" :key="asset.id" :class="{ 'selected': isSelected(asset.id) }">
<button
class="asset-tile outline-none group relative"
v-for="(asset, index) in assets"
:key="asset.id"
:class="{ 'selected': isSelected(asset.id) }"
@click="toggleSelection(asset.id, index, $event)"
@dblclick="$emit('edit-asset', asset)"
>
<div class="asset-thumb-container">
<div class="asset-thumb" @click="toggleSelection(asset.id, index, $event)" @dblclick="$emit('edit-asset', asset)">
<div class="asset-thumb">
<img v-if="asset.is_image" :src="asset.thumbnail" loading="lazy" :class="{'p-4 h-full w-full': asset.extension === 'svg'}" />
<file-icon
v-else
Expand Down

0 comments on commit fd0900f

Please sign in to comment.