@vaadin/combo-box 23.0.0-beta1 → 23.0.0-beta5
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 +13 -13
- package/src/vaadin-combo-box-mixin.js +12 -2
- package/src/vaadin-combo-box.js +15 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/combo-box",
|
|
3
|
-
"version": "23.0.0-
|
|
3
|
+
"version": "23.0.0-beta5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "23.0.0-
|
|
38
|
-
"@vaadin/field-base": "23.0.0-
|
|
39
|
-
"@vaadin/input-container": "23.0.0-
|
|
40
|
-
"@vaadin/item": "23.0.0-
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "23.0.0-
|
|
42
|
-
"@vaadin/vaadin-material-styles": "23.0.0-
|
|
43
|
-
"@vaadin/vaadin-overlay": "23.0.0-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "23.0.0-
|
|
37
|
+
"@vaadin/component-base": "23.0.0-beta5",
|
|
38
|
+
"@vaadin/field-base": "23.0.0-beta5",
|
|
39
|
+
"@vaadin/input-container": "23.0.0-beta5",
|
|
40
|
+
"@vaadin/item": "23.0.0-beta5",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "23.0.0-beta5",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "23.0.0-beta5",
|
|
43
|
+
"@vaadin/vaadin-overlay": "23.0.0-beta5",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "23.0.0-beta5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
|
-
"@vaadin/dialog": "23.0.0-
|
|
49
|
-
"@vaadin/polymer-legacy-adapter": "23.0.0-
|
|
48
|
+
"@vaadin/dialog": "23.0.0-beta5",
|
|
49
|
+
"@vaadin/polymer-legacy-adapter": "23.0.0-beta5",
|
|
50
50
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
51
|
-
"@vaadin/text-field": "23.0.0-
|
|
51
|
+
"@vaadin/text-field": "23.0.0-beta5",
|
|
52
52
|
"lit": "^2.0.0",
|
|
53
53
|
"sinon": "^9.2.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "4c388aeec6623869c70896c909799804fc95d0f9"
|
|
56
56
|
}
|
|
@@ -423,6 +423,16 @@ export const ComboBoxMixin = (subclass) =>
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
+
/**
|
|
427
|
+
* @param {Event} event
|
|
428
|
+
* @protected
|
|
429
|
+
*/
|
|
430
|
+
_onHostClick(_event) {
|
|
431
|
+
if (!this.autoOpenDisabled) {
|
|
432
|
+
this.open();
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
426
436
|
/** @private */
|
|
427
437
|
_onClick(e) {
|
|
428
438
|
this._closeOnBlurIsPrevented = true;
|
|
@@ -437,8 +447,8 @@ export const ComboBoxMixin = (subclass) =>
|
|
|
437
447
|
} else {
|
|
438
448
|
this.open();
|
|
439
449
|
}
|
|
440
|
-
} else
|
|
441
|
-
this.
|
|
450
|
+
} else {
|
|
451
|
+
this._onHostClick(e);
|
|
442
452
|
}
|
|
443
453
|
|
|
444
454
|
this._closeOnBlurIsPrevented = false;
|
package/src/vaadin-combo-box.js
CHANGED
|
@@ -183,8 +183,8 @@ class ComboBox extends ComboBoxDataProviderMixin(
|
|
|
183
183
|
>
|
|
184
184
|
<slot name="prefix" slot="prefix"></slot>
|
|
185
185
|
<slot name="input"></slot>
|
|
186
|
-
<div id="clearButton" part="clear-button" slot="suffix"></div>
|
|
187
|
-
<div id="toggleButton" part="toggle-button" slot="suffix"></div>
|
|
186
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
187
|
+
<div id="toggleButton" part="toggle-button" slot="suffix" aria-hidden="true"></div>
|
|
188
188
|
</vaadin-input-container>
|
|
189
189
|
|
|
190
190
|
<div part="helper-text">
|
|
@@ -293,6 +293,19 @@ class ComboBox extends ComboBoxDataProviderMixin(
|
|
|
293
293
|
|
|
294
294
|
this._handleClearButtonClick(event);
|
|
295
295
|
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* @param {Event} event
|
|
299
|
+
* @protected
|
|
300
|
+
*/
|
|
301
|
+
_onHostClick(event) {
|
|
302
|
+
const path = event.composedPath();
|
|
303
|
+
|
|
304
|
+
// Open dropdown only when clicking on the label or input field
|
|
305
|
+
if (path.includes(this._labelNode) || path.includes(this._positionTarget)) {
|
|
306
|
+
super._onHostClick(event);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
296
309
|
}
|
|
297
310
|
|
|
298
311
|
customElements.define(ComboBox.is, ComboBox);
|