#599 TopPanel x,y and dimension for element, doesn't work
parent
e6ad05ba8e
commit
5f6560154d
|
@ -179,6 +179,19 @@ export class SESpinInput extends HTMLElement {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
connectedCallback () {
|
connectedCallback () {
|
||||||
|
const shadow = this.$input.shadowRoot;
|
||||||
|
const childNodes = Array.from(shadow.childNodes);
|
||||||
|
childNodes.forEach( (childNode) => {
|
||||||
|
if(childNode?.id === "input") {
|
||||||
|
childNode.addEventListener('keyup', (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
if (!isNaN(e.target.value)) {
|
||||||
|
this.value = e.target.value;
|
||||||
|
this.dispatchEvent(this.$event);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
this.$input.addEventListener('change', (e) => {
|
this.$input.addEventListener('change', (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.value = e.target.value;
|
this.value = e.target.value;
|
||||||
|
|
Loading…
Reference in New Issue