Prevent scan modal closing on fullscreen close, and pin filter to fixed reference

This commit is contained in:
Julian Stirling 2026-03-10 17:12:38 +00:00
parent 11d8c6d604
commit 1090e693d4
2 changed files with 19 additions and 5 deletions

View file

@ -20,6 +20,7 @@
:brightness="brightness"
:contrast="contrast"
:saturation="saturation"
@entering-fullscreen="enteringFullscreen = true"
/>
</div>
@ -76,6 +77,7 @@ export default {
brightness: 1,
contrast: 1,
saturation: 1,
enteringFullscreen: false,
};
},
computed: {
@ -86,6 +88,16 @@ export default {
return null;
},
},
mounted() {
const modalEl = this.$refs.scanModal;
modalEl.addEventListener("beforehide", (event) => {
if (this.enteringFullscreen) {
event.preventDefault();
this.enteringFullscreen = false;
}
});
},
methods: {
show() {
UIkit.modal(this.$refs.scanModal).show();