Skip to content

Prevent leaking implementations

Compare
Choose a tag to compare
@renatodeleao renatodeleao released this 14 Mar 14:23
· 105 commits to master since this release
  • Since we have complete freedom on markup, most common implementations apply the v-if on the slot content root as was suggested in readme examples. That being said, it's not wrong to apply v-if to the a11y-vue-dialog itself, to a wrapper element, to the <portal> element or the <transition> element itself. Before this minor, if any of these cases happened, the handleClose handler would not be called, and some leaks could occur. Now we call it correctly on beforeDestroy, meaning that consumers can safely implement in any way.
  • Now forwards the event object that triggers @close

Also tested usage with portal-vue-simple and it works flawlessly, I will probably make this as the official peer-dependency for the official 1.0 release as it's more than enough for our dialog needs and only 3k (1.3k gzip).