@afeefa/vue-app 0.0.155 → 0.0.157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 0.0.155
1
+ 0.0.157
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.155",
3
+ "version": "0.0.157",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -33,6 +33,7 @@ import { getZIndex } from 'vuetify/lib/util/helpers'
33
33
  export default class FlyingContextContainer extends Vue {
34
34
  visible = false
35
35
  oldOverflowY = null
36
+ isClosing = false
36
37
 
37
38
  mounted () {
38
39
  const mutationWatcher = new MutationObserver(this.domChanged)
@@ -59,9 +60,8 @@ export default class FlyingContextContainer extends Vue {
59
60
  return 0
60
61
  }
61
62
 
62
-
63
63
  sizeChanged () {
64
- if (this.visible) {
64
+ if (this.visible && !this.isClosing) { // do not set size if it is already closing
65
65
  this.$nextTick(() => {
66
66
  const scrollbarWidth = this.getScrollbarWidth()
67
67
  const el = document.documentElement
@@ -90,12 +90,16 @@ export default class FlyingContextContainer extends Vue {
90
90
  } else {
91
91
  el.style.overflowY = this.oldOverflowY
92
92
  el.style.marginRight = 0
93
+
94
+ this.$el.style.left = '101vw' // set this if closing from outside e.g. via esc, which does not call this.hide()
93
95
  }
96
+ this.isClosing = false
94
97
  }
95
98
 
96
99
  hide () {
97
100
  if (this.visible) {
98
101
  this.$el.style.left = '101vw'
102
+ this.isClosing = true
99
103
  setTimeout(() => { // fade in then hide contents
100
104
  this.$events.dispatch(new FlyingContextEvent(FlyingContextEvent.HIDE_ALL))
101
105
  }, 200)