Skip to content

Commit

Permalink
Merge pull request #855 from oslokommune/no-outside-click-close
Browse files Browse the repository at this point in the history
Disable closing modals and drawers by outside click
  • Loading branch information
petterhj authored Sep 6, 2023
2 parents 27bf75a + 9b13ac1 commit f5a9d25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ All notable changes to this project will be documented in this file. The format
- Organization, department and product details are now edited from within the
current item's about page.
- Made links clickable in the description of objects, key results and goals.
- It is no longer possible to close open modals or drawers by clicking outside
them. This is meant to prevent accidental data loss in unsaved forms.

## [3.9.0] 2023-09-01

Expand Down
2 changes: 1 addition & 1 deletion src/components/drawers/SliderContainer.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<transition name="fade" mode="out-in">
<div v-if="visible" class="overlay" @click.self="close"></div>
<div v-if="visible" class="overlay"></div>
</transition>
<transition name="slide" @after-leave="$emit('hidden')">
<aside v-if="visible" class="sliderContainer">
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/ModalWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div ref="modalOverlay" class="overlay" @keydown.esc="close" @click.self="close">
<div ref="modalOverlay" class="overlay" @keydown.esc="close">
<div :class="['modal', `modal--${variant}`]">
<div class="modal__header">
<h1 class="pkt-txt-18-medium">
Expand Down

0 comments on commit f5a9d25

Please sign in to comment.