Skip to content
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

Each time you switch to the plugin, it re-registers itself #92

Closed
jketreno opened this issue Nov 2, 2021 · 1 comment · Fixed by #94
Closed

Each time you switch to the plugin, it re-registers itself #92

jketreno opened this issue Nov 2, 2021 · 1 comment · Fixed by #94

Comments

@jketreno
Copy link
Contributor

jketreno commented Nov 2, 2021

If you go to the Advanced -> Plugins and then load a plugin, it registers a 'pageshow' handler. If you leave the page and go back, it registers again with a new instance of the handler. On 'pageshow', each registered handler is then called resulting in race conditions, etc. You can most easily see this by loading in the JavaScript console and seeing the load count for the plugin configuration webpage:

The "3" below grows each time you leave and go back into the plugin.

image

@jketreno
Copy link
Contributor Author

jketreno commented Nov 2, 2021

race conditions

It doesn't look like there is a race condition being caused; I was trying to root cause why leaving and going back into plugin views is randomly clearing my field data. I thought I had that fixed in combination with the fix to the issue here, but it seems that problem is tangential, unless there is another view in Jellyfin doing things with DOM form elements on 'pageshow' or 'viewshow'.

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

Successfully merging a pull request may close this issue.

1 participant