diff --git a/src/fontra/client/web-components/ui-form.js b/src/fontra/client/web-components/ui-form.js index 1c3cc8ade9..8ae5d8f3ec 100644 --- a/src/fontra/client/web-components/ui-form.js +++ b/src/fontra/client/web-components/ui-form.js @@ -173,18 +173,17 @@ export class Form extends SimpleElement { } _addEditAngle(valueElement, fieldItem) { - const inputElement = document.createElement("input"); - inputElement.type = "number"; - inputElement.value = fieldItem.value; - - inputElement.step = "any"; - - inputElement.disabled = fieldItem.disabled; - inputElement.onchange = (event) => { - let value = parseFloat(inputElement.value); - this._fieldChanging(fieldItem.key, value); - rotaryControl.value = value; - }; + const inputElement = html.input({ + type: "number", + value: fieldItem.value, + step: "any", + disabled: fieldItem.disabled, + onchange: () => { + let value = parseFloat(inputElement.value); + this._fieldChanging(fieldItem.key, value); + rotaryControl.value = value; + }, + }); let valueStream; const rotaryControl = html.createDomElement("rotary-control", { value: fieldItem.value,