Why doesn't click event always fire?

前端 未结 3 869
离开以前
离开以前 2021-02-11 16:17

If you\'re revisiting this question I\'ve moved all the updates to the bottom so it actually reads better as a question.

The Problem

I\'ve got a bit o

3条回答
  •  自闭症患者
    2021-02-11 17:23

    var events = function(g) {
    
        // Register the raw events required
        g.on("mousedown.test", mousedown)
         .on("mouseenter.test", mouseenter)
         .on("mouseleave.test", mouseleave)
         .on("click.test", clicked)
         .on("contextmenu.test", contextMenu)
         .on("dblclick.test", doubleClicked);
    
        return g;
    };
    

    Returning g instead of events might resolve the problem.

提交回复
热议问题