refocusses number input on clicks (#16210)

* refocusses number input on clicks

* dragable

* small tag fix
This commit is contained in:
Kashargul
2024-08-26 05:21:08 +10:00
committed by GitHub
parent ef06ade4c2
commit 692045c61c
6 changed files with 51 additions and 55 deletions
@@ -438,7 +438,7 @@
organ.applied_pressure = null
if(user == src)
user.visible_message("\<span class='filter_notice'>The [user] stops applying pressure to [TU.his] [organ.name]!</span>", "<span class='filter_notice'>You stop applying pressure to your [organ]!</span>")
user.visible_message("<span class='filter_notice'>\The [user] stops applying pressure to [TU.his] [organ.name]!</span>", "<span class='filter_notice'>You stop applying pressure to your [organ]!</span>")
else
user.visible_message("<span class='filter_notice'>\The [user] stops applying pressure to [src]'s [organ.name]!</span>", "<span class='filter_notice'>You stop applying pressure to [src]'s [organ.name]!</span>")
@@ -137,12 +137,10 @@ export class DraggableControl extends Component {
} else if (this.inputRef) {
const input = this.inputRef.current;
input.value = internalValue;
// IE8: Dies when trying to focus a hidden element
// (Error: Object does not support this action)
try {
setTimeout(() => {
input.focus();
input.select();
} catch {}
}, 100);
}
};
}
@@ -174,12 +174,10 @@ export class NumberInput extends Component<Props, State> {
} else if (this.inputRef) {
const input = this.inputRef.current!;
input.value = String(internalValue);
// IE8: Dies when trying to focus a hidden element
// (Error: Object does not support this action)
try {
setTimeout(() => {
input.focus();
input.select();
} catch {}
}, 100);
}
};
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long