Skip to content

Inputs not focusing when creating new custom plugin #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pwilkowski opened this issue Jul 11, 2021 · 3 comments
Open

Inputs not focusing when creating new custom plugin #214

pwilkowski opened this issue Jul 11, 2021 · 3 comments

Comments

@pwilkowski
Copy link

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 #59 (comment)

@ngld
Copy link
Owner

ngld commented Nov 20, 2021

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
Copy link
Author

pwilkowski commented Nov 20, 2021

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
Copy link
Owner

ngld commented Nov 20, 2021

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.

sandtechnology pushed a commit to sandtechnology/OverlayPlugin that referenced this issue Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants