#599 TopPanel x,y and dimension for element, doesn't work

master
agriyadev5 2021-08-18 18:52:34 +05:30
parent e6ad05ba8e
commit 5f6560154d
1 changed files with 13 additions and 0 deletions

View File

@ -179,6 +179,19 @@ export class SESpinInput extends HTMLElement {
* @returns {void}
*/
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) => {
e.preventDefault();
this.value = e.target.value;