vendor/assets/js/foundation.dropdown.js.es6 in foundation-rails-6.3.0.0 vs vendor/assets/js/foundation.dropdown.js.es6 in foundation-rails-6.3.1.0
- old
+ new
@@ -258,11 +258,11 @@
* @fires Dropdown#show
*/
open() {
// var _this = this;
/**
- * Fires to close other open dropdowns
+ * Fires to close other open dropdowns, typically when dropdown is opening
* @event Dropdown#closeme
*/
this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));
this.$anchor.addClass('hover')
.attr({'aria-expanded': true});
@@ -315,10 +315,14 @@
/*.hide()*/.css({height: '', width: ''});
this.classChanged = false;
this.counter = 4;
this.usedPositions.length = 0;
}
+ /**
+ * Fires once the dropdown is no longer visible.
+ * @event Dropdown#hide
+ */
this.$element.trigger('hide.zf.dropdown', [this.$element]);
if (this.options.trapFocus) {
Foundation.Keyboard.releaseFocus(this.$element);
}
@@ -349,66 +353,76 @@
}
}
Dropdown.defaults = {
/**
- * Class that designates bounding container of Dropdown (Default: window)
+ * Class that designates bounding container of Dropdown (default: window)
* @option
- * @example 'dropdown-parent'
+ * @type {?string}
+ * @default null
*/
parentClass: null,
/**
* Amount of time to delay opening a submenu on hover event.
* @option
- * @example 250
+ * @type {number}
+ * @default 250
*/
hoverDelay: 250,
/**
* Allow submenus to open on hover events
* @option
- * @example false
+ * @type {boolean}
+ * @default false
*/
hover: false,
/**
* Don't close dropdown when hovering over dropdown pane
* @option
- * @example true
+ * @type {boolean}
+ * @default false
*/
hoverPane: false,
/**
* Number of pixels between the dropdown pane and the triggering element on open.
* @option
- * @example 1
+ * @type {number}
+ * @default 1
*/
vOffset: 1,
/**
* Number of pixels between the dropdown pane and the triggering element on open.
* @option
- * @example 1
+ * @type {number}
+ * @default 1
*/
hOffset: 1,
/**
* Class applied to adjust open position. JS will test and fill this in.
* @option
- * @example 'top'
+ * @type {string}
+ * @default ''
*/
positionClass: '',
/**
* Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands.
* @option
- * @example false
+ * @type {boolean}
+ * @default false
*/
trapFocus: false,
/**
* Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening.
* @option
- * @example true
+ * @type {boolean}
+ * @default false
*/
autoFocus: false,
/**
* Allows a click on the body to close the dropdown.
* @option
- * @example false
+ * @type {boolean}
+ * @default false
*/
closeOnClick: false
}
// Window exports