Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Error when using the Boolean Widget. #5

Closed
rvanosnabrugge opened this issue Jul 25, 2016 · 3 comments
Closed

Error when using the Boolean Widget. #5

rvanosnabrugge opened this issue Jul 25, 2016 · 3 comments
Assignees

Comments

@rvanosnabrugge
Copy link

When using the Boolean slider widget, I receive the following error in the browser console: "An error occured while handling queued requests: Cannot set property "textContent" of null.".

You will be able to reproduce the error as follows: open a (popup) page with the boolean slider widget, close the page and repeat the previous steps (open and close again). The second time you tried to close the page, the error occurs.

If you have any questions, please let me know!

@JelteMX JelteMX self-assigned this Jul 25, 2016
tieniber added a commit that referenced this issue Jul 25, 2016
@tieniber
Copy link
Member

@rvanosnabrugge, can you try the new MPK in your project and see if it resolves your issue. Seems to work in my testing.

@JelteMX , I put in a workaround for this issue as it was causing trouble in one of my projects as well. It seems that we lose our references to this.trueNode and this.falseNode when we get a callback from an attribute listener. Perhaps something wrong with _TemplatedMixin, or perhaps we're not destroying the widget properly?

I resolved this by adding _trueNode and _falseNode variables and setting them in PostCreate.

@rvanosnabrugge
Copy link
Author

rvanosnabrugge commented Jul 26, 2016

The new MPK does not give the error, so I think your fix works =)

Met vriendelijke groet,
Richard van Osnabrugge

@JelteMX
Copy link
Contributor

JelteMX commented Jul 26, 2016

@tieniber thanks, I'll check it out. Maybe we need to restructure the widget. I've promised @rvanosnabrugge to take a look at it either this week or next week. Thanks for the workaround right now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants