Anthony Musgrove 220 Posted April 30, 2020 Posted April 30, 2020 I'm experiencing a very weird issue, where my plugin configuration pages are repeating. Every time I click on the Scripter-X menu icon, or Actions tab, it just loads a new instance of the Actions configuration page, and leaves the old one in the DOM, just sets it to hidden. Is this normal behaviour or am I missing something? Thank you all! <3
Anthony Musgrove 220 Posted April 30, 2020 Author Posted April 30, 2020 The statistics plugin does it too. Every time you click the menu item, it creates a new instance of the configuration page, and attaches it to the DOM tree, hiding the last one which is exactly the same?
Solution Luke 42077 Posted April 30, 2020 Solution Posted April 30, 2020 Yes it's normal because each will have it's own state. That's why you need to make sure your code only does dom operations from the page level downwards, and never does anything within the full document scope. 1
Anthony Musgrove 220 Posted April 30, 2020 Author Posted April 30, 2020 And the playback reporting plugin. I've noticed it only loads 3 instances, is this normal?
Anthony Musgrove 220 Posted April 30, 2020 Author Posted April 30, 2020 Yes it's normal because each will have it's own state. That's why you need to make sure your code only does dom operations from the page level downwards, and never does anything within the full document scope. Awesome, thank you mate, I'm glad its normal and not something I've done wrong
Anthony Musgrove 220 Posted April 30, 2020 Author Posted April 30, 2020 (edited) @@Luke, I'm not sure if you can help me -- but I'm trying to include an external javascript library for the plugin, it's a simple library called SortableJS. I've tried many, many, many different ways and I've had a solution that works but not reliably. Is there some type of plugin js function for loading an external JS library? Or is this not possible? Thanks mate. Edited April 30, 2020 by Anthony.Musgrove
Luke 42077 Posted April 30, 2020 Posted April 30, 2020 @@Luke, I'm not sure if you can help me -- but I'm trying to include an external javascript library for the plugin, it's a simple library called SortableJS. I've tried many, many, many different ways and I've had a solution that works but not reliably. Is there some type of plugin js function for loading an external JS library? Or is this not possible? Thanks mate. Yes take a look at the autoorganize plugin. 1
Anthony Musgrove 220 Posted April 30, 2020 Author Posted April 30, 2020 Mate, you are worth way way more money. That worked amazingly. I'd been working on this for hours. That function is a godsent. Thank you!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now