vendor/assets/js/foundation.reveal.js.es6 in foundation-rails-6.3.0.0 vs vendor/assets/js/foundation.reveal.js.es6 in foundation-rails-6.3.1.0
- old
+ new
@@ -377,18 +377,19 @@
Foundation.Motion.animateOut(this.$element, this.options.animationOut);
}
// jQuery method of hiding
else {
+
+ this.$element.hide(this.options.hideDelay);
+
if (this.options.overlay) {
this.$overlay.hide(0, finishUp);
}
else {
finishUp();
}
-
- this.$element.hide(this.options.hideDelay);
}
// Conditionals to remove extra event listeners added on open
if (this.options.closeOnEsc) {
$(window).off('keydown.zf.reveal');
@@ -400,18 +401,22 @@
this.$element.off('keydown.zf.reveal');
function finishUp() {
if (_this.isMobile) {
- $('html, body').removeClass('is-reveal-open');
+ if ($('.reveal:visible').length === 0) {
+ $('html, body').removeClass('is-reveal-open');
+ }
if(_this.originalScrollPos) {
$('body').scrollTop(_this.originalScrollPos);
_this.originalScrollPos = null;
}
}
else {
- $('body').removeClass('is-reveal-open');
+ if ($('.reveal:visible').length === 0) {
+ $('body').removeClass('is-reveal-open');
+ }
}
Foundation.Keyboard.releaseFocus(_this.$element);
@@ -473,94 +478,109 @@
Reveal.defaults = {
/**
* Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.
* @option
- * @example 'slide-in-left'
+ * @type {string}
+ * @default ''
*/
animationIn: '',
/**
* Motion-UI class to use for animated elements. If none used, defaults to simple show/hide.
* @option
- * @example 'slide-out-right'
+ * @type {string}
+ * @default ''
*/
animationOut: '',
/**
* Time, in ms, to delay the opening of a modal after a click if no animation used.
* @option
- * @example 10
+ * @type {number}
+ * @default 0
*/
showDelay: 0,
/**
* Time, in ms, to delay the closing of a modal after a click if no animation used.
* @option
- * @example 10
+ * @type {number}
+ * @default 0
*/
hideDelay: 0,
/**
* Allows a click on the body/overlay to close the modal.
* @option
- * @example true
+ * @type {boolean}
+ * @default true
*/
closeOnClick: true,
/**
* Allows the modal to close if the user presses the `ESCAPE` key.
* @option
- * @example true
+ * @type {boolean}
+ * @default true
*/
closeOnEsc: true,
/**
* If true, allows multiple modals to be displayed at once.
* @option
- * @example false
+ * @type {boolean}
+ * @default false
*/
multipleOpened: false,
/**
* Distance, in pixels, the modal should push down from the top of the screen.
* @option
- * @example auto
+ * @type {number|string}
+ * @default auto
*/
vOffset: 'auto',
/**
* Distance, in pixels, the modal should push in from the side of the screen.
* @option
- * @example auto
+ * @type {number|string}
+ * @default auto
*/
hOffset: 'auto',
/**
* Allows the modal to be fullscreen, completely blocking out the rest of the view. JS checks for this as well.
* @option
- * @example false
+ * @type {boolean}
+ * @default false
*/
fullScreen: false,
/**
* Percentage of screen height the modal should push up from the bottom of the view.
* @option
- * @example 10
+ * @type {number}
+ * @default 10
*/
btmOffsetPct: 10,
/**
* Allows the modal to generate an overlay div, which will cover the view when modal opens.
* @option
- * @example true
+ * @type {boolean}
+ * @default true
*/
overlay: true,
/**
* Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background.
* @option
- * @example false
+ * @type {boolean}
+ * @default false
*/
resetOnClose: false,
/**
* Allows the modal to alter the url on open/close, and allows the use of the `back` button to close modals. ALSO, allows a modal to auto-maniacally open on page load IF the hash === the modal's user-set id.
* @option
- * @example false
+ * @type {boolean}
+ * @default false
*/
deepLink: false,
/**
* Allows the modal to append to custom div.
* @option
- * @example false
+ * @type {string}
+ * @default "body"
*/
appendTo: "body"
};