Fix enum parsing in site settings panel
This commit is contained in:
parent
64570c71ce
commit
92cd1cf58b
@ -97,6 +97,9 @@ export class KeyboardHandler extends KbmBase {
|
||||
* @param event
|
||||
*/
|
||||
handleEvent(event) {
|
||||
if (this.siteSettings?.data.enableKeyboard === InputHandlingMode.Disabled) {
|
||||
return;
|
||||
}
|
||||
if (this.preventAction(event)) {
|
||||
this.logger.info('handleKeyup', "we are in a text box or something. Doing nothing.");
|
||||
return;
|
||||
|
||||
@ -595,7 +595,10 @@ export default defineComponent({
|
||||
|
||||
setExtensionMode(component, event) {
|
||||
const option = event.target.value;
|
||||
this.siteSettings.set(component, option);
|
||||
|
||||
// event.target.value is always string (experimentally proven fact),
|
||||
// but all dropdown are either non-numeric strings or numbers
|
||||
this.siteSettings.set(component, isNaN(+option) ? option : +option);
|
||||
},
|
||||
|
||||
//#region ADVANCED VIDEO PLAYER SETTINGS
|
||||
|
||||
Loading…
Reference in New Issue
Block a user