Skip to content

Commit 7af61a7

Browse files
committed
minor #2132 [Site] Fix icon modal (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [Site] Fix icon modal * clipboard icons placement * some links were not properly clickable Commits ------- 7799609 [Site] Fix icon modal
2 parents f70775f + 7799609 commit 7af61a7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ux.symfony.com/assets/controllers/icon-modal-controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ export default class extends Controller {
5151
}
5252

5353
onClick(event) {
54-
event.preventDefault();
55-
event.stopImmediatePropagation();
5654
const dialogDimensions = this.element.getBoundingClientRect()
5755
if (
5856
event.clientX < dialogDimensions.left ||
5957
event.clientX > dialogDimensions.right ||
6058
event.clientY < dialogDimensions.top ||
6159
event.clientY > dialogDimensions.bottom
6260
) {
61+
event.preventDefault();
62+
event.stopImmediatePropagation();
6363
this.close()
6464
}
6565
}

ux.symfony.com/assets/styles/components/_IconModal.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@
187187

188188
.IconModal__code button {
189189
opacity: .25;
190+
position: absolute;
191+
right: 0;
192+
top: .5rem;
190193
}
191194

192195
.IconModal__code:hover {

0 commit comments

Comments
 (0)