@primer/view-components 0.5.2-rc.307b0c65 → 0.5.2-rc.5a7f14a3
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.
|
@@ -125,7 +125,12 @@ let ActionMenuElement = class ActionMenuElement extends HTMLElement {
|
|
|
125
125
|
// appears as if hitting enter does nothing. Curiously, clicking instead
|
|
126
126
|
// works fine.
|
|
127
127
|
if (this.selectVariant !== 'multiple') {
|
|
128
|
-
setTimeout(() => {
|
|
128
|
+
setTimeout(() => {
|
|
129
|
+
var _a, _b;
|
|
130
|
+
if ((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.matches(':popover-open')) {
|
|
131
|
+
(_b = this.popoverElement) === null || _b === void 0 ? void 0 : _b.hidePopover();
|
|
132
|
+
}
|
|
133
|
+
});
|
|
129
134
|
}
|
|
130
135
|
// The rest of the code below deals with single/multiple selection behavior, and should not
|
|
131
136
|
// interfere with events fired by menu items whose behavior is specified outside the library.
|
|
@@ -210,7 +210,7 @@ class ToolTipElement extends HTMLElement {
|
|
|
210
210
|
if (value && this.matches(':popover-open')) {
|
|
211
211
|
this.hidePopover();
|
|
212
212
|
}
|
|
213
|
-
else if (!value &&
|
|
213
|
+
else if (!value && this.matches(':not(:popover-open)')) {
|
|
214
214
|
this.showPopover();
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -272,10 +272,10 @@ class ToolTipElement extends HTMLElement {
|
|
|
272
272
|
const isOpeningOtherPopover = event.type === 'beforetoggle' && event.currentTarget !== this;
|
|
273
273
|
const shouldHide = isMouseLeaveFromButton || isEscapeKeydown || isMouseDownOnButton || isOpeningOtherPopover;
|
|
274
274
|
await Promise.resolve();
|
|
275
|
-
if (!showing && shouldShow) {
|
|
275
|
+
if (!showing && shouldShow && this.matches(':not(:popover-open)')) {
|
|
276
276
|
this.showPopover();
|
|
277
277
|
}
|
|
278
|
-
else if (showing && shouldHide) {
|
|
278
|
+
else if (showing && shouldHide && this.matches(':popover-open')) {
|
|
279
279
|
this.hidePopover();
|
|
280
280
|
}
|
|
281
281
|
if (event.type === 'toggle') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/view-components",
|
|
3
|
-
"version": "0.5.2-rc.
|
|
3
|
+
"version": "0.5.2-rc.5a7f14a3",
|
|
4
4
|
"description": "ViewComponents for the Primer Design System",
|
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
|
6
6
|
"module": "app/components/primer/primer.js",
|