@vaadin/context-menu 23.0.0-alpha3 → 23.0.0-beta2

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-alpha3",
3
+ "version": "23.0.0-beta2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "main": "vaadin-context-menu.js",
20
20
  "module": "vaadin-context-menu.js",
21
+ "type": "module",
21
22
  "files": [
22
23
  "src",
23
24
  "theme",
@@ -35,19 +36,19 @@
35
36
  "@open-wc/dedupe-mixin": "^1.3.0",
36
37
  "@polymer/iron-media-query": "^3.0.0",
37
38
  "@polymer/polymer": "^3.0.0",
38
- "@vaadin/component-base": "23.0.0-alpha3",
39
- "@vaadin/item": "23.0.0-alpha3",
40
- "@vaadin/list-box": "23.0.0-alpha3",
41
- "@vaadin/vaadin-lumo-styles": "23.0.0-alpha3",
42
- "@vaadin/vaadin-material-styles": "23.0.0-alpha3",
43
- "@vaadin/vaadin-overlay": "23.0.0-alpha3",
44
- "@vaadin/vaadin-themable-mixin": "23.0.0-alpha3"
39
+ "@vaadin/component-base": "23.0.0-beta2",
40
+ "@vaadin/item": "23.0.0-beta2",
41
+ "@vaadin/list-box": "23.0.0-beta2",
42
+ "@vaadin/vaadin-lumo-styles": "23.0.0-beta2",
43
+ "@vaadin/vaadin-material-styles": "23.0.0-beta2",
44
+ "@vaadin/vaadin-overlay": "23.0.0-beta2",
45
+ "@vaadin/vaadin-themable-mixin": "23.0.0-beta2"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@esm-bundle/chai": "^4.3.4",
48
- "@vaadin/polymer-legacy-adapter": "23.0.0-alpha3",
49
+ "@vaadin/polymer-legacy-adapter": "23.0.0-beta2",
49
50
  "@vaadin/testing-helpers": "^0.3.2",
50
51
  "sinon": "^9.2.1"
51
52
  },
52
- "gitHead": "490037919a9e054cc002c1b3be0c94a1603e1a44"
53
+ "gitHead": "a276f7a0fd00e5459b87267468e0dd0d4fb6f7f3"
53
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
- menu.$.overlay.addEventListener('mouseover', openSubMenu);
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 =