GithubHelp home page GithubHelp logo

Comments (3)

raananzvi avatar raananzvi commented on August 18, 2024

Visuals are hosted inside a sandboxed IFRAME with only allow-scripts enabled see: http://www.w3schools.com/tags/att_iframe_sandbox.asp
It might be the reason.
Why do you need to add event listener on the window in the first place?

from powerbi-visuals-tools.

Knagis avatar Knagis commented on August 18, 2024

The sandbox attribute does not cause this behavior.

sandbox.html

<!DOCTYPE html>
<html>
<body>
<iframe style="width: 100%; height: 300px" sandbox="allow-scripts" src="sandbox-inner.html"></iframe>
</body>
</html>

sandbox-inner.html

<!DOCTYPE html>
<html>
<body>
<div id="result"></div>
<script>
    var result = document.getElementById("result");
    try {
        window.addEventListener("click", function(e){result.innerHTML = "works"});
    } catch (e) {
        result.innerHTML = 'error: ' + e;
    }
</script>
</body>
</html>

As for the need for this - our library attaches to certain mouse events on the window so that it can process them while the pointer is outside of its own elements.

from powerbi-visuals-tools.

raananzvi avatar raananzvi commented on August 18, 2024

After we discussed I was able to pin point the issue in Power BI codebase.
I submitted a fix and it will take some time until it will arrive to production (several weeks).
Closing the issue for now

from powerbi-visuals-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.