@vaadin/context-menu 23.0.0-alpha5 → 23.0.0-beta1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/context-menu",
|
|
3
|
-
"version": "23.0.0-
|
|
3
|
+
"version": "23.0.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
37
|
"@polymer/iron-media-query": "^3.0.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "23.0.0-
|
|
40
|
-
"@vaadin/item": "23.0.0-
|
|
41
|
-
"@vaadin/list-box": "23.0.0-
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "23.0.0-
|
|
43
|
-
"@vaadin/vaadin-material-styles": "23.0.0-
|
|
44
|
-
"@vaadin/vaadin-overlay": "23.0.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "23.0.0-
|
|
39
|
+
"@vaadin/component-base": "23.0.0-beta1",
|
|
40
|
+
"@vaadin/item": "23.0.0-beta1",
|
|
41
|
+
"@vaadin/list-box": "23.0.0-beta1",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "23.0.0-beta1",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "23.0.0-beta1",
|
|
44
|
+
"@vaadin/vaadin-overlay": "23.0.0-beta1",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "23.0.0-beta1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@esm-bundle/chai": "^4.3.4",
|
|
49
|
-
"@vaadin/polymer-legacy-adapter": "23.0.0-
|
|
49
|
+
"@vaadin/polymer-legacy-adapter": "23.0.0-beta1",
|
|
50
50
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
51
51
|
"sinon": "^9.2.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "467244b76021176c109df675799b07029b293e58"
|
|
54
54
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { flush } from '@polymer/polymer/lib/utils/flush.js';
|
|
7
|
+
import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
|
|
7
8
|
import { Item } from '@vaadin/item/src/vaadin-item.js';
|
|
8
9
|
import { ListBox } from '@vaadin/list-box/src/vaadin-list-box.js';
|
|
9
10
|
|
|
@@ -361,7 +362,10 @@ export const ItemsMixin = (superClass) =>
|
|
|
361
362
|
}
|
|
362
363
|
};
|
|
363
364
|
|
|
364
|
-
|
|
365
|
+
// Open a submenu on click event when a touch device is used.
|
|
366
|
+
// On desktop, a submenu opens on hover.
|
|
367
|
+
menu.$.overlay.addEventListener(isTouch ? 'click' : 'mouseover', openSubMenu);
|
|
368
|
+
|
|
365
369
|
menu.$.overlay.addEventListener('keydown', (e) => {
|
|
366
370
|
const isRTL = this.__isRTL;
|
|
367
371
|
const shouldOpenSubMenu =
|