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

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

Closed

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.

(Recreated the previous request stuck in Travis CI check.)

@KSR-Yasuda KSR-Yasuda closed this Sep 11, 2017
@KSR-Yasuda KSR-Yasuda reopened this Sep 11, 2017
@KSR-Yasuda KSR-Yasuda closed this Sep 11, 2017
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.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy