Skip to content

Commit 90f7ec0

Browse files
committed
do not exit fullscreen if selection has changed
1 parent 6772e06 commit 90f7ec0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

resources/js/form/components/fields/editor/EditorMaybeFullscreenDialog.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
const isFullscreen = defineModel<boolean>('fullscreen');
1010
1111
function onBackdropPointerDown(pointerDownEvent: PointerEvent) {
12+
const downSelection = window.getSelection().toString();
1213
window.addEventListener('pointerup', (pointerUpEvent: PointerEvent) => {
13-
if(pointerDownEvent.target === pointerUpEvent.target) {
14+
if(pointerDownEvent.target === pointerUpEvent.target
15+
&& downSelection === window.getSelection().toString()
16+
) {
1417
isFullscreen.value = false;
1518
}
1619
}, { once: true });

0 commit comments

Comments
 (0)