@vaadin/context-menu 22.0.0-beta2 → 22.0.2

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": "22.0.0-beta2",
3
+ "version": "22.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,19 +35,19 @@
35
35
  "@open-wc/dedupe-mixin": "^1.3.0",
36
36
  "@polymer/iron-media-query": "^3.0.0",
37
37
  "@polymer/polymer": "^3.0.0",
38
- "@vaadin/component-base": "22.0.0-beta2",
39
- "@vaadin/item": "22.0.0-beta2",
40
- "@vaadin/list-box": "22.0.0-beta2",
41
- "@vaadin/vaadin-lumo-styles": "22.0.0-beta2",
42
- "@vaadin/vaadin-material-styles": "22.0.0-beta2",
43
- "@vaadin/vaadin-overlay": "22.0.0-beta2",
44
- "@vaadin/vaadin-themable-mixin": "22.0.0-beta2"
38
+ "@vaadin/component-base": "^22.0.2",
39
+ "@vaadin/item": "^22.0.2",
40
+ "@vaadin/list-box": "^22.0.2",
41
+ "@vaadin/vaadin-lumo-styles": "^22.0.2",
42
+ "@vaadin/vaadin-material-styles": "^22.0.2",
43
+ "@vaadin/vaadin-overlay": "^22.0.2",
44
+ "@vaadin/vaadin-themable-mixin": "^22.0.2"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@esm-bundle/chai": "^4.3.4",
48
- "@vaadin/polymer-legacy-adapter": "22.0.0-beta2",
49
- "@vaadin/testing-helpers": "^0.3.0",
48
+ "@vaadin/polymer-legacy-adapter": "^22.0.2",
49
+ "@vaadin/testing-helpers": "^0.3.2",
50
50
  "sinon": "^9.2.1"
51
51
  },
52
- "gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4"
52
+ "gitHead": "df21370c4a655a38eac11f79686021ab3b0887ad"
53
53
  }
@@ -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 { prevent, register } from '@polymer/polymer/lib/utils/gestures.js';
7
+ import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
7
8
 
8
9
  register({
9
10
  name: 'vaadin-contextmenu',
@@ -16,10 +17,7 @@ register({
16
17
  emits: ['vaadin-contextmenu'],
17
18
 
18
19
  info: {
19
- sourceEvent: null,
20
- _ios:
21
- (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) ||
22
- (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)
20
+ sourceEvent: null
23
21
  },
24
22
 
25
23
  reset: function () {
@@ -50,7 +48,7 @@ register({
50
48
  this._timerId = setTimeout(() => {
51
49
  const ct = e.changedTouches[0];
52
50
  if (!e.shiftKey) {
53
- if (this.info._ios) {
51
+ if (isIOS) {
54
52
  this._fired = true;
55
53
  this.fire(t, ct.clientX, ct.clientY);
56
54
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import '@polymer/iron-media-query/iron-media-query.js';
7
7
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
8
+ import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
8
9
 
9
10
  /**
10
11
  * Element for internal use only.
@@ -38,7 +39,7 @@ class DeviceDetector extends PolymerElement {
38
39
  touch: {
39
40
  type: Boolean,
40
41
  notify: true,
41
- value: () => this._touch()
42
+ value: isTouch
42
43
  },
43
44
 
44
45
  /**
@@ -51,15 +52,6 @@ class DeviceDetector extends PolymerElement {
51
52
  };
52
53
  }
53
54
 
54
- static _touch() {
55
- try {
56
- document.createEvent('TouchEvent');
57
- return true;
58
- } catch (err) {
59
- return false;
60
- }
61
- }
62
-
63
55
  _phone(wide, touch) {
64
56
  return !wide && touch;
65
57
  }
@@ -90,7 +90,8 @@ registerStyles(
90
90
  registerStyles(
91
91
  'vaadin-context-menu-item',
92
92
  css`
93
- :host {
93
+ /* :hover needed to workaround https://github.com/vaadin/web-components/issues/3133 */
94
+ :host(:hover) {
94
95
  user-select: none;
95
96
  -ms-user-select: none;
96
97
  -webkit-user-select: none;