diff --git a/packages/base/src/UI5Element.js b/packages/base/src/UI5Element.js index d3e8918d7b99..51af56a5d73a 100644 --- a/packages/base/src/UI5Element.js +++ b/packages/base/src/UI5Element.js @@ -470,7 +470,7 @@ class UI5Element extends HTMLElement { const focusDomRef = this.getFocusDomRef(); - if (focusDomRef) { + if (focusDomRef && typeof focusDomRef.focus === "function") { focusDomRef.focus(); } } diff --git a/packages/main/package.json b/packages/main/package.json index 0208e201dfb2..fd97f926206e 100644 --- a/packages/main/package.json +++ b/packages/main/package.json @@ -109,7 +109,7 @@ "@wdio/sync": "^5.12.1", "@webcomponents/webcomponentsjs": "^2.2.7", "chai": "^4.2.0", - "chromedriver": "^76.0.0", + "chromedriver": "^77.0.0", "clean-css": "^4.2.1", "copy-and-watch": "^0.1.2", "cpx": "^1.5.0", @@ -153,6 +153,6 @@ "resolutions": { "abstract-syntax-tree": "1.0.3", "dir-glob": "2.0.0", - "wdio-chromedriver-service/chromedriver": "^76.0.0" + "wdio-chromedriver-service/chromedriver": "^77.0.0" } } \ No newline at end of file diff --git a/packages/main/src/Input.hbs b/packages/main/src/Input.hbs index 3294f4f6c316..6a4fe7c8d433 100644 --- a/packages/main/src/Input.hbs +++ b/packages/main/src/Input.hbs @@ -11,6 +11,7 @@ keyup should not be called yet */ - const skipFiring = (this.getInputDOMRef().value === this.value) && isIE() && !this._keyDown && this.placeholder; + const skipFiring = (this.getInputDOMRef().value === this.value) && isIE() && !this._keyDown && !!this.placeholder; !skipFiring && this.fireEventByAction(this.ACTION_USER_INPUT); diff --git a/packages/main/src/MultiComboBox.hbs b/packages/main/src/MultiComboBox.hbs index a71c486f8a5f..597accc3f930 100644 --- a/packages/main/src/MultiComboBox.hbs +++ b/packages/main/src/MultiComboBox.hbs @@ -20,13 +20,15 @@ diff --git a/packages/main/src/MultiComboBox.js b/packages/main/src/MultiComboBox.js index fc5af8d86795..879b4121bf41 100644 --- a/packages/main/src/MultiComboBox.js +++ b/packages/main/src/MultiComboBox.js @@ -4,6 +4,7 @@ import ValueState from "@ui5/webcomponents-base/dist/types/ValueState.js"; import { isShow, isDown, isBackSpace } from "@ui5/webcomponents-base/dist/events/PseudoEvents.js"; import "./icons/slim-arrow-down.js"; import { getRTL } from "@ui5/webcomponents-base/dist/config/RTL.js"; +import { isIE } from "@ui5/webcomponents-core/dist/sap/ui/Device.js"; import MultiComboBoxTemplate from "./generated/templates/MultiComboBoxTemplate.lit.js"; import Input from "./Input.js"; import Tokenizer from "./Tokenizer.js"; @@ -278,7 +279,20 @@ class MultiComboBox extends UI5Element { const filteredItems = this._filterItems(value); const oldValueState = this.valueState; + /* skip calling change event when an input with a placeholder is focused on IE + - value of the host and the internal input should be differnt in case of actual input + - input is called when a key is pressed => keyup should not be called yet + */ + const skipFiring = (this._inputDom.value === this.value) && isIE && !this._keyDown && !!this.placeholder; + + if (skipFiring) { + event.preventDefault(); + + return; + } + if (this._validationTimeout) { + input.value = this._inputLastValue; return; } @@ -290,6 +304,7 @@ class MultiComboBox extends UI5Element { this.valueState = oldValueState; this._validationTimeout = null; }, 2000); + return; } @@ -331,7 +346,11 @@ class MultiComboBox extends UI5Element { } } - _keydown(event) { + _onkeyup() { + this._keyDown = false; + } + + _onkeydown(event) { if (isShow(event) && !this.readonly && !this.disabled) { event.preventDefault(); this._togglePopover(); @@ -356,6 +375,8 @@ class MultiComboBox extends UI5Element { this._tokenizer.tokens[lastTokenIndex].focus(); this._tokenizer._itemNav.currentIndex = lastTokenIndex; } + + this._keyDown = true; } _filterItems(value) { diff --git a/packages/main/src/Popover.hbs b/packages/main/src/Popover.hbs index 7790df379b70..fdb012218ea0 100644 --- a/packages/main/src/Popover.hbs +++ b/packages/main/src/Popover.hbs @@ -1,17 +1,27 @@ -{{>include "./Popup.hbs"}} +