ngld / OverlayPlugin

Yet another OverlayPlugin fork.
Other
229 stars 39 forks source link

Inputs not focusing when creating new custom plugin #214

Open pwilkowski opened 3 years ago

pwilkowski commented 3 years ago

There is something weird going on here. I was writing my player bar plugin but without checking 'ACTWS Compatibility' I was not able to gain focus on any of the input fields.

When I did checked it, suddenly all of my inputs started working properly. Then after unclicking it (unchecking) inputs still worked.

I do have this piece of code that suppose to enable focus when user enters config mode:

    toggleSettings() {
        console.log('toggle config');
        this.configVisible = !this.configVisible;
        (window as any).OverlayPluginApi.setAcceptFocus(this.configVisible);
    }

But it doesn't seems to be working at all.

Originally posted by @pwilkowski in https://github.com/ngld/OverlayPlugin/issues/59#issuecomment-877746907

ngld commented 2 years ago

One of the things the "ACTWS Compatiblity" option does is call OverlayPluginApi.setAcceptFocus(true). After you uncheck it, that and a few other effects remain active until the overlay is reloaded.

Can you send me a link to your overlay so I can test this myself?

pwilkowski commented 2 years ago

its not possible to replicate, it happens completely randomly, sometimes it was fine for couple of days, sometimes it bricked 3 times a day

URL is: https://kaminaris.github.io/Next-UI/

ngld commented 2 years ago

I couldn't reproduce the issue and the code is fairly simple (it just toggles a flag on the window) so I'm not sure what would be going wrong here. Either the call itself fails and the flag is never modified or OverlayPlugin modifies the flag but Windows ignores it but I wouldn't know what would cause that.