Giter VIP home page Giter VIP logo

Comments (4)

jcubic avatar jcubic commented on June 11, 2024 1

This is the code that is using that function:

function disable(e) {
    if (is_mobile) {
        return;
    }
    e = e.originalEvent;
    if (e) {
        // e.terget is body when click outside of context menu to close it
        // even if you click on terminal
        var node = document.elementFromPoint(e.clientX, e.clientY);
        if (!$(node).closest('.terminal').length && self.enabled()) {
            // we only need to disable when click outside of terminal
            // click on other terminal is handled by focus event
            self.disable();
        }
    }
}
self.oneTime(100, function() {
    $(document).bind('click.terminal_' + self.id(), disable).
        bind('contextmenu.terminal_' + self.id(), disable);
});

For some reason, this library trigger click event without clientX and clientY.

This is easy to fix, since real click event have isTrusted === true.

from jquery.terminal.

jcubic avatar jcubic commented on June 11, 2024 1

Oh, didn't know you can install from GitHub. Good to know. I'm releasing 2.40.2 with the fix.

from jquery.terminal.

jcubic avatar jcubic commented on June 11, 2024

It should be fixed now, but you need to test locally with devel branch.

You can do this by cloing the repo, checkout devel branch and using npm link.

from jquery.terminal.

KiddoV avatar KiddoV commented on June 11, 2024

I managed to test it using npm install github:jcubic/jquery.terminal#devel without cloning the entire repo.
It works! No more ERROR. Thank you!

from jquery.terminal.

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.