Skip to content

Commit db8fbdb

Browse files
committed
aesthetics
1 parent 1f7b96b commit db8fbdb

File tree

1 file changed

+8
-9
lines changed
  • services/static-webserver/client/source/class/osparc/ui/form

1 file changed

+8
-9
lines changed

services/static-webserver/client/source/class/osparc/ui/form/IntlTelInput.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,21 @@ qx.Class.define("osparc.ui.form.IntlTelInput", {
169169
const textColor = qx.theme.manager.Color.getInstance().resolve("text");
170170
const bgColor = qx.theme.manager.Color.getInstance().resolve("input_background");
171171
const productColor = qx.theme.manager.Color.getInstance().resolve("product-color");
172+
const phoneInputField = this.getChildControl("phone-input-field");
173+
const feedbackIcon = this.getChildControl("feedback-icon");
174+
const width = isCompact ? 152 : 215;
175+
const phoneInputWidth = feedbackIcon.isVisible() ? width - 14 : width;
172176
const height = isCompact ? 26 : 30;
173177

174-
this.getChildControl("phone-input-field").set({
175-
minWidth: 185,
178+
phoneInputField.set({
179+
maxWidth: width,
176180
maxHeight: height,
177181
margin: 0,
178182
});
179183

180184
const phoneInput = this.__phoneInput;
181-
const feedbackIcon = this.getChildControl("feedback-icon");
182185
if (phoneInput) {
183-
phoneInput.a.style["width"] = feedbackIcon.isVisible() ? "185px" : "215px";
186+
phoneInput.a.style["width"] = phoneInputWidth + "px";
184187
phoneInput.a.style["height"] = height + "px";
185188
phoneInput.a.style["borderWidth"] = "0px";
186189
phoneInput.a.style["backgroundColor"] = isCompact ? "transparent" : bgColor;
@@ -229,11 +232,7 @@ qx.Class.define("osparc.ui.form.IntlTelInput", {
229232
dropdownContainer: document.body,
230233
});
231234

232-
// Trigger validation on input and blur
233-
domElement.addEventListener("input", () => {
234-
this.verifyPhoneNumber();
235-
this._applyValue(this.getValue()); // keep qooxdoo form property in sync
236-
});
235+
// Trigger validation on blur
237236
domElement.addEventListener("blur", () => this.verifyPhoneNumber());
238237

239238
this.__updateStyle();

0 commit comments

Comments
 (0)