@atlassian/aui 9.12.6 → 9.12.7
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.
- package/LICENSE +1 -1
- package/README.md +7 -9
- package/dist/aui/aui-css-deprecations.js.map +1 -1
- package/dist/aui/aui-prototyping-browserfocus.css +1 -1
- package/dist/aui/aui-prototyping-browserfocus.css.map +1 -1
- package/dist/aui/aui-prototyping-darkmode.css +1 -1
- package/dist/aui/aui-prototyping-darkmode.css.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api-full.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api-full.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css +2 -2
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-compatibility.css +1 -1
- package/dist/aui/aui-prototyping-design-tokens-compatibility.css.map +1 -1
- package/dist/aui/aui-prototyping.css +10 -10
- package/dist/aui/aui-prototyping.css.map +1 -1
- package/dist/aui/aui-prototyping.js +2 -2
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +10 -10
- package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +2 -2
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/dist/aui/fonts/adgs-icons.eot +0 -0
- package/dist/aui/fonts/adgs-icons.ttf +0 -0
- package/dist/aui/fonts/adgs-icons.woff +0 -0
- package/entry/aui.batch.components.js +23 -23
- package/entry/aui.batch.page.js +3 -3
- package/entry/aui.batch.patterns.js +20 -20
- package/entry/aui.batch.prototyping.js +3 -11
- package/entry/aui.component.nav.js +1 -1
- package/entry/aui.component.progressbar.js +4 -1
- package/entry/aui.side-effects.js +2 -2
- package/entry/behaviours/aui.behaviour.format.js +1 -1
- package/entry/behaviours/aui.behaviour.i18n.js +1 -1
- package/entry/behaviours/aui.behaviour.keyboard-shortcuts.js +1 -1
- package/entry/behaviours/aui.behaviour.progressive-data-set.js +1 -1
- package/entry/behaviours/aui.behaviour.version.js +1 -1
- package/entry/deprecated/aui.component.inline-dialog1.js +1 -1
- package/entry/styles/aui-design-tokens-compatibility.less +114 -115
- package/package.json +2 -2
- package/src/js/aui/alphanum.js +1 -1
- package/src/js/aui/avatar-badged.js +4 -5
- package/src/js/aui/avatar-group.js +58 -28
- package/src/js/aui/avatar.js +16 -14
- package/src/js/aui/banner.js +3 -2
- package/src/js/aui/blanket.js +11 -14
- package/src/js/aui/button.js +5 -5
- package/src/js/aui/checkbox-multiselect.js +79 -76
- package/src/js/aui/clone.js +1 -1
- package/src/js/aui/close-button.js +2 -6
- package/src/js/aui/contain-dropdown.js +5 -5
- package/src/js/aui/contains.js +1 -1
- package/src/js/aui/cookie.js +12 -16
- package/src/js/aui/date-picker.js +89 -68
- package/src/js/aui/debounce.js +5 -8
- package/src/js/aui/design-tokens/design-tokens-full.js +4 -13
- package/src/js/aui/design-tokens/design-tokens-init.js +1 -3
- package/src/js/aui/design-tokens/design-tokens-testing-theme.js +9 -15
- package/src/js/aui/design-tokens/design-tokens.js +2 -4
- package/src/js/aui/dialog.js +206 -172
- package/src/js/aui/dialog2.js +36 -25
- package/src/js/aui/dropdown2.js +221 -189
- package/src/js/aui/escape-html.js +2 -2
- package/src/js/aui/escape.js +1 -1
- package/src/js/aui/event.js +4 -8
- package/src/js/aui/expander.js +15 -13
- package/src/js/aui/flag.js +24 -22
- package/src/js/aui/focus-manager.js +20 -21
- package/src/js/aui/form-notification.js +16 -15
- package/src/js/aui/form-validation/basic-validators.js +39 -30
- package/src/js/aui/form-validation/validator-register.js +9 -5
- package/src/js/aui/form-validation.js +12 -13
- package/src/js/aui/format.js +9 -6
- package/src/js/aui/forms/create-forms-component-body.js +6 -9
- package/src/js/aui/forms/custom-checkbox.js +2 -6
- package/src/js/aui/forms/custom-radio.js +2 -6
- package/src/js/aui/forms.js +4 -8
- package/src/js/aui/header-async.js +1 -1
- package/src/js/aui/header.js +2 -2
- package/src/js/aui/i18n.js +6 -13
- package/src/js/aui/index-of.js +1 -1
- package/src/js/aui/inline-dialog.js +171 -117
- package/src/js/aui/inline-dialog2.js +40 -33
- package/src/js/aui/internal/a11y/focusable-query.js +2 -4
- package/src/js/aui/internal/add-id.js +1 -1
- package/src/js/aui/internal/alignment.js +57 -49
- package/src/js/aui/internal/amdify.js +0 -1
- package/src/js/aui/internal/animation.js +2 -5
- package/src/js/aui/internal/attributes.js +2 -3
- package/src/js/aui/internal/browser.js +6 -7
- package/src/js/aui/internal/constants.js +1 -3
- package/src/js/aui/internal/deduplicateIDs.js +8 -7
- package/src/js/aui/internal/deprecation/deprecated-adg2-icons.js +132 -132
- package/src/js/aui/internal/deprecation.js +54 -32
- package/src/js/aui/internal/detect-children-change.js +3 -2
- package/src/js/aui/internal/elements.js +2 -5
- package/src/js/aui/internal/enforcer.js +11 -13
- package/src/js/aui/internal/globalize.js +12 -5
- package/src/js/aui/internal/has-touch.js +1 -2
- package/src/js/aui/internal/header/create-header.js +54 -30
- package/src/js/aui/internal/i18n/aui.js +9 -5
- package/src/js/aui/internal/i18n/aui_af.js +31 -31
- package/src/js/aui/internal/i18n/aui_ar.js +31 -31
- package/src/js/aui/internal/i18n/aui_ar_DZ.js +31 -31
- package/src/js/aui/internal/i18n/aui_az.js +31 -31
- package/src/js/aui/internal/i18n/aui_bg.js +31 -31
- package/src/js/aui/internal/i18n/aui_bs.js +31 -31
- package/src/js/aui/internal/i18n/aui_ca.js +31 -31
- package/src/js/aui/internal/i18n/aui_cs.js +31 -31
- package/src/js/aui/internal/i18n/aui_da.js +31 -31
- package/src/js/aui/internal/i18n/aui_de.js +31 -31
- package/src/js/aui/internal/i18n/aui_el.js +31 -31
- package/src/js/aui/internal/i18n/aui_en_AU.js +31 -31
- package/src/js/aui/internal/i18n/aui_en_GB.js +31 -31
- package/src/js/aui/internal/i18n/aui_en_NZ.js +31 -31
- package/src/js/aui/internal/i18n/aui_eo.js +31 -31
- package/src/js/aui/internal/i18n/aui_es.js +31 -31
- package/src/js/aui/internal/i18n/aui_et.js +31 -31
- package/src/js/aui/internal/i18n/aui_eu.js +31 -31
- package/src/js/aui/internal/i18n/aui_fa.js +31 -31
- package/src/js/aui/internal/i18n/aui_fi.js +31 -31
- package/src/js/aui/internal/i18n/aui_fo.js +31 -31
- package/src/js/aui/internal/i18n/aui_fr.js +31 -31
- package/src/js/aui/internal/i18n/aui_fr_CH.js +31 -31
- package/src/js/aui/internal/i18n/aui_gl.js +31 -31
- package/src/js/aui/internal/i18n/aui_he.js +31 -31
- package/src/js/aui/internal/i18n/aui_hr.js +31 -31
- package/src/js/aui/internal/i18n/aui_hu.js +31 -31
- package/src/js/aui/internal/i18n/aui_hy.js +31 -31
- package/src/js/aui/internal/i18n/aui_id.js +31 -31
- package/src/js/aui/internal/i18n/aui_is.js +31 -31
- package/src/js/aui/internal/i18n/aui_it.js +31 -31
- package/src/js/aui/internal/i18n/aui_ja.js +31 -31
- package/src/js/aui/internal/i18n/aui_ko.js +31 -31
- package/src/js/aui/internal/i18n/aui_kz.js +31 -31
- package/src/js/aui/internal/i18n/aui_lt.js +31 -31
- package/src/js/aui/internal/i18n/aui_lv.js +31 -31
- package/src/js/aui/internal/i18n/aui_ml.js +31 -31
- package/src/js/aui/internal/i18n/aui_ms.js +31 -31
- package/src/js/aui/internal/i18n/aui_nl.js +31 -31
- package/src/js/aui/internal/i18n/aui_no.js +31 -31
- package/src/js/aui/internal/i18n/aui_pl.js +31 -31
- package/src/js/aui/internal/i18n/aui_pt.js +31 -31
- package/src/js/aui/internal/i18n/aui_pt_BR.js +31 -31
- package/src/js/aui/internal/i18n/aui_rm.js +31 -31
- package/src/js/aui/internal/i18n/aui_ro.js +31 -31
- package/src/js/aui/internal/i18n/aui_ru.js +31 -31
- package/src/js/aui/internal/i18n/aui_sk.js +31 -31
- package/src/js/aui/internal/i18n/aui_sl.js +31 -31
- package/src/js/aui/internal/i18n/aui_sq.js +31 -31
- package/src/js/aui/internal/i18n/aui_sr.js +31 -31
- package/src/js/aui/internal/i18n/aui_sr_SR.js +31 -31
- package/src/js/aui/internal/i18n/aui_sv.js +31 -31
- package/src/js/aui/internal/i18n/aui_ta.js +31 -31
- package/src/js/aui/internal/i18n/aui_th.js +31 -31
- package/src/js/aui/internal/i18n/aui_tj.js +31 -31
- package/src/js/aui/internal/i18n/aui_tr.js +31 -31
- package/src/js/aui/internal/i18n/aui_uk.js +31 -31
- package/src/js/aui/internal/i18n/aui_vi.js +31 -31
- package/src/js/aui/internal/i18n/aui_zh_CN.js +31 -31
- package/src/js/aui/internal/i18n/aui_zh_HK.js +31 -31
- package/src/js/aui/internal/i18n/aui_zh_TW.js +31 -31
- package/src/js/aui/internal/log.js +2 -6
- package/src/js/aui/internal/mediaQuery.js +2 -3
- package/src/js/aui/internal/select/option.js +3 -3
- package/src/js/aui/internal/select/suggestion-model.js +1 -1
- package/src/js/aui/internal/select/suggestions-model.js +4 -5
- package/src/js/aui/internal/select/suggestions-view.js +17 -12
- package/src/js/aui/internal/state.js +2 -3
- package/src/js/aui/is-clipped.js +2 -2
- package/src/js/aui/key-code.js +1 -1
- package/src/js/aui/label.js +6 -6
- package/src/js/aui/layer.js +101 -89
- package/src/js/aui/messages.js +67 -43
- package/src/js/aui/navigation.js +7 -9
- package/src/js/aui/on-text-resize.js +7 -5
- package/src/js/aui/params.js +11 -8
- package/src/js/aui/polyfills/custom-event.js +9 -9
- package/src/js/aui/polyfills/placeholder.js +4 -4
- package/src/js/aui/populate-parameters.js +4 -4
- package/src/js/aui/progress-indicator.js +35 -27
- package/src/js/aui/progressive-data-set.js +13 -8
- package/src/js/aui/query-input.js +1 -1
- package/src/js/aui/restful-table/class-names.js +1 -1
- package/src/js/aui/restful-table/data-keys.js +1 -1
- package/src/js/aui/restful-table/edit-row.js +63 -63
- package/src/js/aui/restful-table/entry-model.js +6 -13
- package/src/js/aui/restful-table/event-handlers.js +4 -8
- package/src/js/aui/restful-table/event-names.js +1 -1
- package/src/js/aui/restful-table/row.js +41 -23
- package/src/js/aui/restful-table.js +101 -72
- package/src/js/aui/result-set.js +5 -5
- package/src/js/aui/results-list.js +3 -3
- package/src/js/aui/select.js +72 -51
- package/src/js/aui/select2.js +16 -8
- package/src/js/aui/sidebar.js +81 -51
- package/src/js/aui/spin.js +61 -49
- package/src/js/aui/spinner.js +11 -12
- package/src/js/aui/tables-sortable.js +21 -10
- package/src/js/aui/tabs.js +108 -77
- package/src/js/aui/to-init.js +1 -1
- package/src/js/aui/toggle.js +55 -43
- package/src/js/aui/tooltip.js +34 -33
- package/src/js/aui/trigger.js +21 -19
- package/src/js/aui/truncating-progressive-data-set.js +1 -1
- package/src/js/aui/unbind-text-resize.js +1 -1
- package/src/js/aui/unique-id.js +1 -1
- package/src/js/aui/when-i-type.js +67 -40
- package/src/js/aui-css-deprecations.js +52 -51
- package/src/js/jquery/jquery.moveto.js +18 -12
- package/src/less/adg-fancy-file-input.less +2 -3
- package/src/less/adg-header-quicksearch.less +5 -2
- package/src/less/adg-iconfont.less +242 -242
- package/src/less/adgs-icons.less +262 -262
- package/src/less/aui-appheader.less +10 -6
- package/src/less/aui-avatars.less +1 -1
- package/src/less/aui-banner.less +2 -1
- package/src/less/aui-buttons.less +6 -5
- package/src/less/aui-dark-mode.less +1 -1
- package/src/less/aui-date-picker.less +9 -6
- package/src/less/aui-experimental-expander.less +3 -3
- package/src/less/aui-experimental-labels.less +1 -1
- package/src/less/aui-experimental-progress-indicator.less +10 -4
- package/src/less/aui-experimental-progress-tracker.less +9 -6
- package/src/less/aui-experimental-restfultable.less +11 -3
- package/src/less/aui-experimental-tables-sortable.less +5 -3
- package/src/less/aui-experimental-tooltip.less +1 -1
- package/src/less/aui-link.less +0 -1
- package/src/less/aui-lozenge.less +6 -3
- package/src/less/aui-navigation.less +16 -14
- package/src/less/aui-page-layout.less +3 -4
- package/src/less/aui-page-typography.less +8 -3
- package/src/less/aui-reset.less +22 -6
- package/src/less/aui-select2.less +12 -9
- package/src/less/aui-sidebar-badges.less +1 -2
- package/src/less/aui-sidebar-config.less +7 -2
- package/src/less/aui-sidebar-grouping.less +22 -6
- package/src/less/aui-sidebar-navigation.less +7 -5
- package/src/less/aui-sidebar-skeleton.less +12 -7
- package/src/less/aui-skip-link.less +2 -1
- package/src/less/aui-spinner.less +2 -2
- package/src/less/aui-toggle.less +8 -4
- package/src/less/aui-toolbar2.less +1 -1
- package/src/less/checkbox-multiselect.less +13 -13
- package/src/less/dialog.less +3 -3
- package/src/less/dialog2.less +11 -10
- package/src/less/dropdown2-temp.css +4 -4
- package/src/less/dropdown2.less +4 -4
- package/src/less/flag.less +2 -2
- package/src/less/form-notification.less +10 -6
- package/src/less/forms-current.less +16 -18
- package/src/less/forms-legacy.less +4 -2
- package/src/less/forms-radios-and-checkboxes.less +18 -16
- package/src/less/forms.less +2 -4
- package/src/less/iconfont-mixin.less +7 -4
- package/src/less/imports/aui-theme/adg/adg-colors.less +40 -40
- package/src/less/imports/aui-theme/adg/adg-neutral-dark.less +20 -20
- package/src/less/imports/aui-theme/adg/adg-neutral-light.less +20 -20
- package/src/less/imports/aui-theme/components/buttons.less +7 -1
- package/src/less/imports/aui-theme/components/dropdown.less +3 -1
- package/src/less/imports/aui-theme/components/flag.less +1 -1
- package/src/less/imports/aui-theme/components/form-notification.less +2 -1
- package/src/less/imports/aui-theme/components/forms.less +8 -3
- package/src/less/imports/aui-theme/components/inline-dialog2.less +1 -1
- package/src/less/imports/aui-theme/components/navigation.less +6 -3
- package/src/less/imports/aui-theme/components/progress-tracker.less +6 -2
- package/src/less/imports/aui-theme/components/tables.less +3 -2
- package/src/less/imports/aui-theme/components/toggle.less +8 -3
- package/src/less/imports/aui-theme/core/colors.less +2 -2
- package/src/less/imports/aui-theme/core/icons.less +22 -22
- package/src/less/imports/aui-theme/core/text.less +6 -3
- package/src/less/imports/aui-theme/theme.less +1 -3
- package/src/less/imports/mixins/dropdown2-trigger-chevron-icon.less +0 -1
- package/src/less/imports/mixins/focus.less +12 -4
- package/src/less/imports/mixins/media-queries.less +2 -2
- package/src/less/imports/mixins/shadows.less +3 -1
- package/src/less/imports/mixins/tab-indicator.less +2 -2
- package/src/less/imports/mixins.less +11 -4
- package/src/less/inline-dialog.less +21 -19
- package/src/less/layer.less +0 -2
- package/src/less/messages.less +2 -1
- package/src/less/single-select.less +15 -10
- package/src/less/tables.less +3 -2
- package/src/less/tabs.less +4 -3
package/src/js/aui/tooltip.js
CHANGED
|
@@ -15,14 +15,14 @@ const AUI_TOOLTIP_TIMEOUT = 300;
|
|
|
15
15
|
* @type {{n: string, ne: string, e: string, se: string, s: string, sw: string, w: string, nw: string}}
|
|
16
16
|
*/
|
|
17
17
|
const GRAVITY_MAP = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
n: 'bottom',
|
|
19
|
+
ne: 'bottom-end',
|
|
20
|
+
e: 'left',
|
|
21
|
+
se: 'top-end',
|
|
22
|
+
s: 'top',
|
|
23
|
+
sw: 'top-start',
|
|
24
|
+
w: 'right',
|
|
25
|
+
nw: 'bottom-start',
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
// This key is used to differentiate events related to this particular plugin.
|
|
@@ -36,14 +36,14 @@ const defaultOptions = {
|
|
|
36
36
|
suppress: () => false,
|
|
37
37
|
aria: true,
|
|
38
38
|
sanitize: true,
|
|
39
|
-
maxWidth: 200
|
|
40
|
-
}
|
|
39
|
+
maxWidth: 200,
|
|
40
|
+
};
|
|
41
41
|
|
|
42
42
|
let $sharedTip;
|
|
43
43
|
|
|
44
44
|
const getTipNode = () => {
|
|
45
45
|
return $sharedTip && $sharedTip.get(0);
|
|
46
|
-
}
|
|
46
|
+
};
|
|
47
47
|
|
|
48
48
|
const toggleTooltipVisibility = (shouldBeHidden = false) => {
|
|
49
49
|
const tipNode = getTipNode();
|
|
@@ -51,7 +51,7 @@ const toggleTooltipVisibility = (shouldBeHidden = false) => {
|
|
|
51
51
|
tipNode.classList.toggle('hidden', shouldBeHidden);
|
|
52
52
|
tipNode.setAttribute('aria-hidden', shouldBeHidden);
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
|
|
56
56
|
class Tooltip {
|
|
57
57
|
constructor(triggerElement, options) {
|
|
@@ -85,7 +85,6 @@ class Tooltip {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
observeTriggerRemoval() {
|
|
88
|
-
|
|
89
88
|
const observedElements = [];
|
|
90
89
|
|
|
91
90
|
if (this.options.$delegationRoot && this.options.$delegationRoot.get(0)) {
|
|
@@ -97,7 +96,7 @@ class Tooltip {
|
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
this.triggerObservers = observedElements
|
|
100
|
-
.map(element => {
|
|
99
|
+
.map((element) => {
|
|
101
100
|
const parent = element.parentElement;
|
|
102
101
|
if (parent) {
|
|
103
102
|
const observer = new MutationObserver(() => {
|
|
@@ -108,12 +107,12 @@ class Tooltip {
|
|
|
108
107
|
});
|
|
109
108
|
observer.observe(parent, {
|
|
110
109
|
childList: true,
|
|
111
|
-
subtree: false // We take trigger parent, so we only care about direct children
|
|
110
|
+
subtree: false, // We take trigger parent, so we only care about direct children
|
|
112
111
|
});
|
|
113
112
|
return observer;
|
|
114
113
|
}
|
|
115
114
|
})
|
|
116
|
-
.filter(observer => !!observer);
|
|
115
|
+
.filter((observer) => !!observer);
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
unbindHandlers() {
|
|
@@ -128,7 +127,7 @@ class Tooltip {
|
|
|
128
127
|
}
|
|
129
128
|
|
|
130
129
|
if (this.triggerObservers.length > 0) {
|
|
131
|
-
this.triggerObservers.forEach(observer => observer.disconnect());
|
|
130
|
+
this.triggerObservers.forEach((observer) => observer.disconnect());
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
// We only need to unbind event handlers from this particular element
|
|
@@ -136,8 +135,10 @@ class Tooltip {
|
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
initContainer() {
|
|
139
|
-
if ($sharedTip === undefined || $sharedTip.get(0) && !$sharedTip.get(0).isConnected) {
|
|
140
|
-
$sharedTip = $(
|
|
138
|
+
if ($sharedTip === undefined || ($sharedTip.get(0) && !$sharedTip.get(0).isConnected)) {
|
|
139
|
+
$sharedTip = $(
|
|
140
|
+
`<div id="${AUI_TOOLTIP_ID}" class="${AUI_TOOLTIP_CLASS_NAME} hidden" role="tooltip" aria-hidden="true"><p class="aui-tooltip-content"></p></div>`
|
|
141
|
+
);
|
|
141
142
|
$(document.body).append($sharedTip);
|
|
142
143
|
}
|
|
143
144
|
}
|
|
@@ -165,14 +166,15 @@ class Tooltip {
|
|
|
165
166
|
getTipTitle() {
|
|
166
167
|
const options = this.options;
|
|
167
168
|
|
|
168
|
-
let title =
|
|
169
|
-
options.title
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
let title =
|
|
170
|
+
typeof options.title === 'function'
|
|
171
|
+
? options.title
|
|
172
|
+
: typeof options.title === 'string'
|
|
173
|
+
? () => options.title
|
|
174
|
+
: () => this.originalTitle || '';
|
|
173
175
|
|
|
174
176
|
let actualTitle = title.call(this.triggerElement);
|
|
175
|
-
return
|
|
177
|
+
return !actualTitle || !actualTitle.trim().length ? undefined : actualTitle;
|
|
176
178
|
}
|
|
177
179
|
|
|
178
180
|
show() {
|
|
@@ -258,9 +260,9 @@ const getTooltipInstance = (domNode, options) => {
|
|
|
258
260
|
}
|
|
259
261
|
}
|
|
260
262
|
return tooltip;
|
|
261
|
-
}
|
|
263
|
+
};
|
|
262
264
|
|
|
263
|
-
const namespacify = events => events.map(event => `${event}.${pluginKey}`).join(' ');
|
|
265
|
+
const namespacify = (events) => events.map((event) => `${event}.${pluginKey}`).join(' ');
|
|
264
266
|
|
|
265
267
|
const activationEvents = namespacify(['mouseenter', 'focus']);
|
|
266
268
|
const deactivationEvents = namespacify(['click', 'mouseleave', 'blur']);
|
|
@@ -283,7 +285,7 @@ $.fn.tooltip = function (arg) {
|
|
|
283
285
|
const commandName = arg;
|
|
284
286
|
|
|
285
287
|
if (typeof tooltip[commandName] !== 'function') {
|
|
286
|
-
throw new Error(`Method ${commandName} does not exist on tooltip.`)
|
|
288
|
+
throw new Error(`Method ${commandName} does not exist on tooltip.`);
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
tooltip[commandName]();
|
|
@@ -309,7 +311,7 @@ $.fn.tooltip = function (arg) {
|
|
|
309
311
|
clearAllTimers();
|
|
310
312
|
hide();
|
|
311
313
|
});
|
|
312
|
-
}
|
|
314
|
+
};
|
|
313
315
|
|
|
314
316
|
const show = function () {
|
|
315
317
|
// Stop all events that were triggered by different tooltip
|
|
@@ -321,8 +323,7 @@ $.fn.tooltip = function (arg) {
|
|
|
321
323
|
tooltip.show();
|
|
322
324
|
$sharedTip && updateTooltipEvents();
|
|
323
325
|
}, AUI_TOOLTIP_TIMEOUT);
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
+
};
|
|
326
327
|
|
|
327
328
|
const hide = function () {
|
|
328
329
|
// Stop all events that were triggered by different tooltip
|
|
@@ -332,13 +333,13 @@ $.fn.tooltip = function (arg) {
|
|
|
332
333
|
hideTimeoutId = setTimeout(() => {
|
|
333
334
|
tooltip.hide();
|
|
334
335
|
}, AUI_TOOLTIP_TIMEOUT);
|
|
335
|
-
}
|
|
336
|
+
};
|
|
336
337
|
|
|
337
338
|
const hideOnEsc = function (e) {
|
|
338
339
|
if (e.code === 'Escape') {
|
|
339
340
|
hide();
|
|
340
341
|
}
|
|
341
|
-
}
|
|
342
|
+
};
|
|
342
343
|
|
|
343
344
|
const selector = options.live;
|
|
344
345
|
if (selector !== undefined) {
|
package/src/js/aui/trigger.js
CHANGED
|
@@ -3,22 +3,22 @@ import keyCode from './key-code';
|
|
|
3
3
|
import amdify from './internal/amdify';
|
|
4
4
|
import skate from './internal/skate';
|
|
5
5
|
import state from './internal/state';
|
|
6
|
-
import { warn } from './internal/log'
|
|
6
|
+
import { warn } from './internal/log';
|
|
7
7
|
|
|
8
|
-
export function getTrigger
|
|
8
|
+
export function getTrigger(element) {
|
|
9
9
|
return state(element).get('last-trigger') || findControllers(element)[0];
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export function setTrigger
|
|
12
|
+
export function setTrigger(element, trigger) {
|
|
13
13
|
var validTrigger = trigger && trigger.nodeType && trigger.nodeType === 1;
|
|
14
14
|
return state(element).set('last-trigger', validTrigger ? trigger : false);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export function hasTrigger
|
|
17
|
+
export function hasTrigger(element) {
|
|
18
18
|
return !!getTrigger(element);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export function doIfTrigger
|
|
21
|
+
export function doIfTrigger(element, callback) {
|
|
22
22
|
var trigger = getTrigger(element);
|
|
23
23
|
|
|
24
24
|
if (trigger) {
|
|
@@ -26,7 +26,7 @@ export function doIfTrigger (element, callback) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export function forEachTrigger
|
|
29
|
+
export function forEachTrigger(element, callback) {
|
|
30
30
|
return Array.prototype.forEach.call(findControllers(element), callback);
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -41,26 +41,28 @@ function findControllers(element) {
|
|
|
41
41
|
|
|
42
42
|
let controllers = [];
|
|
43
43
|
let someFramesAreCrossOrigin = false;
|
|
44
|
-
for (let i = 0
|
|
44
|
+
for (let i = 0; i < frames.length; i++) {
|
|
45
45
|
try {
|
|
46
46
|
let nodeList = frames[i].document.querySelectorAll(selector);
|
|
47
47
|
controllers = controllers.concat(Array.prototype.slice.apply(nodeList));
|
|
48
|
-
|
|
48
|
+
// eslint-disable-next-line no-unused-vars
|
|
49
49
|
} catch (e) {
|
|
50
50
|
// Silently catch DOM exceptions related to accessing cross-origin frames
|
|
51
51
|
someFramesAreCrossOrigin = true;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
const currentDocumentControllers = document.querySelectorAll(selector);
|
|
55
|
-
const allControllers = Array.prototype.slice
|
|
55
|
+
const allControllers = Array.prototype.slice
|
|
56
|
+
.apply(currentDocumentControllers)
|
|
57
|
+
.concat(controllers);
|
|
56
58
|
if (allControllers.length === 0 && someFramesAreCrossOrigin === true) {
|
|
57
59
|
warn(
|
|
58
60
|
[
|
|
59
61
|
`No triggers found for element (${element.id}) in iframes from the same origin.`,
|
|
60
62
|
'However some iframes in this document are cross-origin.',
|
|
61
|
-
'The trigger-element relations crossing the origin boundary are not supported.'
|
|
63
|
+
'The trigger-element relations crossing the origin boundary are not supported.',
|
|
62
64
|
].join(' ')
|
|
63
|
-
)
|
|
65
|
+
);
|
|
64
66
|
}
|
|
65
67
|
return allControllers;
|
|
66
68
|
}
|
|
@@ -69,7 +71,7 @@ function findControlled(trigger) {
|
|
|
69
71
|
return document.getElementById(trigger.getAttribute('aria-controls'));
|
|
70
72
|
}
|
|
71
73
|
|
|
72
|
-
function isEnabled
|
|
74
|
+
function isEnabled(element) {
|
|
73
75
|
return element.getAttribute('aria-disabled') !== 'true';
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -95,7 +97,7 @@ function msg(e, type) {
|
|
|
95
97
|
target,
|
|
96
98
|
currentTarget,
|
|
97
99
|
relatedTarget,
|
|
98
|
-
preventDefault: () => e.preventDefault()
|
|
100
|
+
preventDefault: () => e.preventDefault(),
|
|
99
101
|
};
|
|
100
102
|
}
|
|
101
103
|
|
|
@@ -134,16 +136,16 @@ const events = {
|
|
|
134
136
|
triggerMessage(trigger, e);
|
|
135
137
|
},
|
|
136
138
|
blur(trigger, e) {
|
|
137
|
-
if (focusingToControlledElement(trigger, e)){
|
|
139
|
+
if (focusingToControlledElement(trigger, e)) {
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
140
142
|
triggerMessage(trigger, e);
|
|
141
|
-
}
|
|
143
|
+
},
|
|
142
144
|
};
|
|
143
145
|
|
|
144
|
-
Object.keys(events).forEach(function(name) {
|
|
146
|
+
Object.keys(events).forEach(function (name) {
|
|
145
147
|
const handler = events[name];
|
|
146
|
-
$(document).on(`${name}.aui-trigger`, '[data-aui-trigger]', function(e) {
|
|
148
|
+
$(document).on(`${name}.aui-trigger`, '[data-aui-trigger]', function (e) {
|
|
147
149
|
handler(e.currentTarget, msg(e, name));
|
|
148
150
|
});
|
|
149
151
|
});
|
|
@@ -159,8 +161,8 @@ skate('data-aui-trigger', {
|
|
|
159
161
|
},
|
|
160
162
|
isEnabled: function () {
|
|
161
163
|
return isEnabled(this);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
+
},
|
|
165
|
+
},
|
|
164
166
|
});
|
|
165
167
|
|
|
166
168
|
amdify('aui/trigger');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import globalize from './internal/globalize';
|
|
2
2
|
import onTextResize from './on-text-resize';
|
|
3
3
|
|
|
4
|
-
function unbindTextResize
|
|
4
|
+
function unbindTextResize(f) {
|
|
5
5
|
for (var i = 0, ii = onTextResize['on-text-resize'].length; i < ii; i++) {
|
|
6
6
|
if (onTextResize['on-text-resize'][i] === f) {
|
|
7
7
|
return onTextResize['on-text-resize'].splice(i, 1);
|
package/src/js/aui/unique-id.js
CHANGED
|
@@ -12,7 +12,8 @@ const EMPTY_SELECTOR = false;
|
|
|
12
12
|
|
|
13
13
|
var isMac = navigator.platform.indexOf('Mac') !== -1;
|
|
14
14
|
var isSafari = navigator.userAgent.indexOf('Safari') !== -1;
|
|
15
|
-
var multiCharRegex =
|
|
15
|
+
var multiCharRegex =
|
|
16
|
+
/^(backspace|tab|r(ight|eturn)|s(hift|pace|croll)|c(trl|apslock)|alt|pa(use|ge(up|down))|e(sc|nd)|home|left|up|d(el|own)|insert|f\d\d?|numlock|meta)/i;
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Trigger native click event.
|
|
@@ -26,12 +27,27 @@ const triggerClickEvent = ($el) => {
|
|
|
26
27
|
const bubbles = true;
|
|
27
28
|
const cancelable = true;
|
|
28
29
|
const event = document.createEvent('MouseEvent');
|
|
29
|
-
event.initMouseEvent(
|
|
30
|
+
event.initMouseEvent(
|
|
31
|
+
'click',
|
|
32
|
+
bubbles,
|
|
33
|
+
cancelable,
|
|
34
|
+
window,
|
|
35
|
+
0,
|
|
36
|
+
0,
|
|
37
|
+
0,
|
|
38
|
+
0,
|
|
39
|
+
0,
|
|
40
|
+
false,
|
|
41
|
+
false,
|
|
42
|
+
false,
|
|
43
|
+
false,
|
|
44
|
+
0,
|
|
45
|
+
null
|
|
46
|
+
);
|
|
30
47
|
element.dispatchEvent(event);
|
|
31
48
|
}
|
|
32
49
|
};
|
|
33
50
|
|
|
34
|
-
|
|
35
51
|
/**
|
|
36
52
|
* Keyboard commands with syntactic sugar.
|
|
37
53
|
*
|
|
@@ -43,7 +59,7 @@ const triggerClickEvent = ($el) => {
|
|
|
43
59
|
*
|
|
44
60
|
* @param keys - Key combinations, modifier keys are "+" deliminated. e.g "ctrl+b"
|
|
45
61
|
*/
|
|
46
|
-
function whenIType
|
|
62
|
+
function whenIType(keys) {
|
|
47
63
|
var boundKeyCombos = [];
|
|
48
64
|
var executor = $.Callbacks();
|
|
49
65
|
|
|
@@ -81,9 +97,8 @@ function whenIType (keys) {
|
|
|
81
97
|
// bind a single key combo to this handler
|
|
82
98
|
// A string like "abc 123" means (a then b then c) OR (1 then 2 then 3). abc is one key combo, 123 is another.
|
|
83
99
|
function bindKeyCombo(keyCombo) {
|
|
84
|
-
var keysArr =
|
|
85
|
-
keyCombo :
|
|
86
|
-
keyComboArrayFromString(keyCombo.toString());
|
|
100
|
+
var keysArr =
|
|
101
|
+
keyCombo instanceof Array ? keyCombo : keyComboArrayFromString(keyCombo.toString());
|
|
87
102
|
var eventType = hasUnprintables(keysArr) ? 'keydown' : 'keypress';
|
|
88
103
|
|
|
89
104
|
boundKeyCombos.push(keysArr);
|
|
@@ -106,12 +121,10 @@ function whenIType (keys) {
|
|
|
106
121
|
if (modifierMatch) {
|
|
107
122
|
currModifiers += modifierMatch[0];
|
|
108
123
|
keyString = keyString.substring(modifierMatch[0].length);
|
|
109
|
-
|
|
110
124
|
} else if (multiCharMatch) {
|
|
111
125
|
keysArr.push(currModifiers + multiCharMatch[0]);
|
|
112
126
|
keyString = keyString.substring(multiCharMatch[0].length);
|
|
113
127
|
currModifiers = '';
|
|
114
|
-
|
|
115
128
|
} else {
|
|
116
129
|
keysArr.push(currModifiers + keyString[0]);
|
|
117
130
|
keyString = keyString.substring(1);
|
|
@@ -127,22 +140,35 @@ function whenIType (keys) {
|
|
|
127
140
|
var title = elem.attr('title') || '';
|
|
128
141
|
var keyCombos = boundKeyCombos.slice();
|
|
129
142
|
var existingCombos = elem.data('boundKeyCombos') || [];
|
|
130
|
-
var kbShortcutAppended = elem.data('kbShortcutAppended') || ''
|
|
131
|
-
var kbShortcutAppendedScreenReader = elem.data('kbShortcutAppendedScreenReader') || ''
|
|
143
|
+
var kbShortcutAppended = elem.data('kbShortcutAppended') || '';
|
|
144
|
+
var kbShortcutAppendedScreenReader = elem.data('kbShortcutAppendedScreenReader') || '';
|
|
132
145
|
var ariaLabel = elem.attr('aria-label');
|
|
133
146
|
var isFirstShortcut = !kbShortcutAppended;
|
|
134
147
|
var isFirstShortcutScreenReader = !kbShortcutAppendedScreenReader;
|
|
135
|
-
var originalTitle = isFirstShortcut
|
|
136
|
-
|
|
148
|
+
var originalTitle = isFirstShortcut
|
|
149
|
+
? title
|
|
150
|
+
: title.substring(0, title.length - kbShortcutAppended.length);
|
|
151
|
+
var originalAriaLabel = isFirstShortcutScreenReader
|
|
152
|
+
? title
|
|
153
|
+
: ariaLabel.substring(0, ariaLabel.length - kbShortcutAppendedScreenReader.length);
|
|
137
154
|
|
|
138
155
|
while (keyCombos.length) {
|
|
139
156
|
var keyCombo = keyCombos.shift();
|
|
140
|
-
var comboAlreadyExists = existingCombos.some(function(existingCombo) {
|
|
157
|
+
var comboAlreadyExists = existingCombos.some(function (existingCombo) {
|
|
141
158
|
return isEqual(keyCombo, existingCombo);
|
|
142
159
|
});
|
|
143
160
|
if (!comboAlreadyExists) {
|
|
144
|
-
kbShortcutAppended = appendKeyComboInstructions(
|
|
145
|
-
|
|
161
|
+
kbShortcutAppended = appendKeyComboInstructions(
|
|
162
|
+
keyCombo.slice(),
|
|
163
|
+
kbShortcutAppended,
|
|
164
|
+
isFirstShortcut
|
|
165
|
+
);
|
|
166
|
+
kbShortcutAppendedScreenReader = appendKeyComboInstructions(
|
|
167
|
+
keyCombo.slice(),
|
|
168
|
+
kbShortcutAppendedScreenReader,
|
|
169
|
+
isFirstShortcutScreenReader,
|
|
170
|
+
{ workaroundJaws: true }
|
|
171
|
+
);
|
|
146
172
|
isFirstShortcut = false;
|
|
147
173
|
isFirstShortcutScreenReader = false;
|
|
148
174
|
}
|
|
@@ -150,15 +176,15 @@ function whenIType (keys) {
|
|
|
150
176
|
|
|
151
177
|
if (isMac) {
|
|
152
178
|
kbShortcutAppended = kbShortcutAppended
|
|
153
|
-
.replace(/Meta/
|
|
154
|
-
.replace(/Shift/
|
|
179
|
+
.replace(/Meta/gi, '\u2318') //Apple cmd key
|
|
180
|
+
.replace(/Shift/gi, '\u21E7'); //Apple Shift symbol
|
|
155
181
|
kbShortcutAppendedScreenReader = kbShortcutAppendedScreenReader
|
|
156
|
-
.replace(/Meta/
|
|
157
|
-
.replace(/Shift/
|
|
182
|
+
.replace(/Meta/gi, '\u2318') //Apple cmd key
|
|
183
|
+
.replace(/Shift/gi, '\u21E7'); //Apple Shift symbol
|
|
158
184
|
}
|
|
159
185
|
|
|
160
186
|
elem.attr('title', originalTitle + kbShortcutAppended);
|
|
161
|
-
elem.attr('aria-label', originalAriaLabel + kbShortcutAppendedScreenReader)
|
|
187
|
+
elem.attr('aria-label', originalAriaLabel + kbShortcutAppendedScreenReader);
|
|
162
188
|
elem.data('kbShortcutAppended', kbShortcutAppended);
|
|
163
189
|
elem.data('kbShortcutAppendedScreenReader', kbShortcutAppendedScreenReader);
|
|
164
190
|
elem.data('boundKeyCombos', existingCombos.concat(boundKeyCombos));
|
|
@@ -190,7 +216,10 @@ function whenIType (keys) {
|
|
|
190
216
|
}
|
|
191
217
|
|
|
192
218
|
if (isFirst) {
|
|
193
|
-
title +=
|
|
219
|
+
title +=
|
|
220
|
+
' ' +
|
|
221
|
+
openParenthesis +
|
|
222
|
+
I18n.getText('aui.keyboard.shortcut.type.x', keyCombo.shift());
|
|
194
223
|
} else {
|
|
195
224
|
title = title.replace(/\)$/, '');
|
|
196
225
|
title += ' ' + I18n.getText('aui.keyboard.shortcut.or.x', keyCombo.shift());
|
|
@@ -212,7 +241,7 @@ function whenIType (keys) {
|
|
|
212
241
|
addShortcutsToTitle: addShortcutsToTitle,
|
|
213
242
|
removeShortcutsFromTitle: removeShortcutsFromTitle,
|
|
214
243
|
keypressHandler: keypressHandler,
|
|
215
|
-
defaultPreventionHandler: defaultPreventionHandler
|
|
244
|
+
defaultPreventionHandler: defaultPreventionHandler,
|
|
216
245
|
});
|
|
217
246
|
}
|
|
218
247
|
|
|
@@ -234,10 +263,9 @@ whenIType.makeShortcut = function (options) {
|
|
|
234
263
|
var escToCancel = options.hasOwnProperty('escToCancel') ? options.escToCancel : true;
|
|
235
264
|
|
|
236
265
|
executor.add(function () {
|
|
237
|
-
|
|
238
266
|
const $items = $(selector);
|
|
239
267
|
let $focusedElem = $items.filter('.' + focusedClass);
|
|
240
|
-
const moveToOptions = $focusedElem.length === 0 ? undefined : {transition: true};
|
|
268
|
+
const moveToOptions = $focusedElem.length === 0 ? undefined : { transition: true };
|
|
241
269
|
|
|
242
270
|
if (escToCancel) {
|
|
243
271
|
$(document).one('keydown', function (e) {
|
|
@@ -268,7 +296,6 @@ whenIType.makeShortcut = function (options) {
|
|
|
268
296
|
}
|
|
269
297
|
|
|
270
298
|
return {
|
|
271
|
-
|
|
272
299
|
/**
|
|
273
300
|
* Scrolls to and adds <em>focused</em> class to the next item in the jQuery collection
|
|
274
301
|
*
|
|
@@ -282,7 +309,6 @@ whenIType.makeShortcut = function (options) {
|
|
|
282
309
|
|
|
283
310
|
if (wrapAround && $focusedElem.length === 0) {
|
|
284
311
|
return $items.eq(0);
|
|
285
|
-
|
|
286
312
|
} else {
|
|
287
313
|
index = $.inArray($focusedElem.get(0), $items);
|
|
288
314
|
if (index < $items.length - 1) {
|
|
@@ -307,7 +333,6 @@ whenIType.makeShortcut = function (options) {
|
|
|
307
333
|
var index;
|
|
308
334
|
if (wrapAround && $focusedElem.length === 0) {
|
|
309
335
|
return $items.filter(':last');
|
|
310
|
-
|
|
311
336
|
} else {
|
|
312
337
|
index = $.inArray($focusedElem.get(0), $items);
|
|
313
338
|
if (index > 0) {
|
|
@@ -366,7 +391,7 @@ whenIType.makeShortcut = function (options) {
|
|
|
366
391
|
|
|
367
392
|
executor.add(function () {
|
|
368
393
|
var elem = $(selector)[0];
|
|
369
|
-
if (elem && {
|
|
394
|
+
if (elem && { a: true, link: true }[elem.nodeName.toLowerCase()]) {
|
|
370
395
|
window.location.href = elem.href;
|
|
371
396
|
}
|
|
372
397
|
});
|
|
@@ -473,7 +498,7 @@ whenIType.makeShortcut = function (options) {
|
|
|
473
498
|
removeShortcutsFromTitle(selectorsWithTitlesModified[i]);
|
|
474
499
|
}
|
|
475
500
|
selectorsWithTitlesModified = [];
|
|
476
|
-
}
|
|
501
|
+
},
|
|
477
502
|
};
|
|
478
503
|
};
|
|
479
504
|
|
|
@@ -517,7 +542,7 @@ whenIType.fromJSON = function (json, switchCtrlToMetaOnMac) {
|
|
|
517
542
|
var shortcuts = [];
|
|
518
543
|
|
|
519
544
|
if (json) {
|
|
520
|
-
$.each(json, function (i,item) {
|
|
545
|
+
$.each(json, function (i, item) {
|
|
521
546
|
const operation = item.op;
|
|
522
547
|
const param = item.param;
|
|
523
548
|
let params;
|
|
@@ -525,26 +550,29 @@ whenIType.fromJSON = function (json, switchCtrlToMetaOnMac) {
|
|
|
525
550
|
if (operation === 'execute' || operation === 'evaluate') {
|
|
526
551
|
// need to turn function string into function object
|
|
527
552
|
params = [new Function(param)];
|
|
528
|
-
|
|
529
553
|
} else if (/^\[[^\]\[]*,[^\]\[]*\]$/.test(param)) {
|
|
530
554
|
// pass in an array to send multiple params
|
|
531
555
|
try {
|
|
532
556
|
params = JSON.parse(param);
|
|
533
|
-
|
|
557
|
+
// eslint-disable-next-line no-unused-vars
|
|
534
558
|
} catch (e) {
|
|
535
|
-
logger.error(
|
|
559
|
+
logger.error(
|
|
560
|
+
'When using a parameter array, array must be in strict JSON format: ' +
|
|
561
|
+
param
|
|
562
|
+
);
|
|
536
563
|
}
|
|
537
564
|
|
|
538
565
|
if (!$.isArray(params)) {
|
|
539
|
-
logger.error(
|
|
566
|
+
logger.error(
|
|
567
|
+
'Badly formatted shortcut parameter. String or JSON Array of parameters required: ' +
|
|
568
|
+
param
|
|
569
|
+
);
|
|
540
570
|
}
|
|
541
|
-
|
|
542
571
|
} else {
|
|
543
572
|
params = [param];
|
|
544
573
|
}
|
|
545
574
|
|
|
546
575
|
$.each(item.keys, function () {
|
|
547
|
-
|
|
548
576
|
var shortcutList = this;
|
|
549
577
|
if (switchCtrlToMetaOnMac && isMac) {
|
|
550
578
|
shortcutList = $.map(shortcutList, function (shortcutString) {
|
|
@@ -556,7 +584,6 @@ whenIType.fromJSON = function (json, switchCtrlToMetaOnMac) {
|
|
|
556
584
|
newShortcut[operation].apply(newShortcut, params);
|
|
557
585
|
shortcuts.push(newShortcut);
|
|
558
586
|
});
|
|
559
|
-
|
|
560
587
|
});
|
|
561
588
|
}
|
|
562
589
|
|
|
@@ -578,8 +605,8 @@ $(document).on('iframeAppended', function (e, iframe) {
|
|
|
578
605
|
$.event.trigger(
|
|
579
606
|
e,
|
|
580
607
|
arguments, // Preserve original event data.
|
|
581
|
-
document,
|
|
582
|
-
true
|
|
608
|
+
document, // Bubble this event from the iframe's document to its parent document.
|
|
609
|
+
true // Use the capturing phase to preserve original event.target.
|
|
583
610
|
);
|
|
584
611
|
}
|
|
585
612
|
});
|