Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Make sure element is connected to DOM before element.setVisible() #1304

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KSR-Yasuda
Copy link

In Browser.html home page, this element.setVisible() raises an error below:

JavaScript error: http://localhost:6060/components/Main.js, line 10: InvalidNodeTypeError: The supplied node is incorrect or has an incorrect ancestor for this operation.

It calls this visibility() with the page iframe as the element.
But at the very first time, the iframe looks newly created and out of DOM tree;
And it turns out to fail element.setVisible() and raise the exception.

So fixed to check element is surely under document before element.setVisible().
Otherwise, skip it.

With this fix, each element's first call of visibility() is ignored.
But such brand-new element should be visible and it does not make any problem, I think.


Check environment is below:

  • OS: Ubuntu 16.04.3 LTS
  • Browser: Graphene
    • Patched to enable mozbrowser for http://
    • And set user_pref("dom.mozBrowserFramesEnabledForContent", true); in user.js in profile.

@KSR-Yasuda
Copy link
Author

The Travis CI check looks stuck.
I'll close this and recreate another.

@KSR-Yasuda
Copy link
Author

Closed and reopend, the check went well.
What was that...? :-/

@paulrouget
Copy link
Contributor

@Gozala what do you think?

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

Successfully merging this pull request may close these issues.

None yet

2 participants