simplify_jackets icon indicating copy to clipboard operation
simplify_jackets copied to clipboard

mousemove listener doesn't work after the first click on jacket

Open ofilippov opened this issue 11 years ago • 7 comments

I can add mousemove listener on some node on jacket and it works fine. However after I make a click on jacket musemove listener doesn't respond anymore. Second and all other clicks work fine (click listener responds).

Video: http://screencast.com/t/WYj5z8aUF

Code:

<!DOCTYPE html>
<html lang="en" xml:lang="en">
<head>
    <meta name="jacket.title" content="Test" />
    <meta name="jacket.author" content="Oleg Philippov" />
    <meta name="jacket.version" content="1.0" />
    <meta name="jacket.uid" content="com.philippov.test" />

    <meta name="jacket.bounds" content="304x53" />
    <meta name="jacket.variations" content="Small" />
    <meta name="jacket.options" content="no-dragging" />


    <script>
        Simplify.listen(Simplify.events.ready, function(size, state)
        {
            $("#main").mousemove(function(e) {
                __log("move: " + e.pageX);
            });

            $("#main").click(function(e) {
                __log("click: " + e.pageX);
            });
        });

        function __log(str)
        {
            document.getElementById("log").innerHTML = str.toString();
        }
    </script>
</head>
<body>
    <div id="main" style="position: absolute; top: 1px; left: 1px; width: 302px; height: 48px; background: linear-gradient(to bottom,#F0F0F0 0%,#C8C8C8 100%);border-radius: 4px;border-bottom: 1px solid #CFCFCF;border-top: 1px solid #FCFCFC;box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2); user-select: none;-webkit-user-select: none;">

        <div id="log" style="position: absolute; top: 0px; right: 0px; color: red"></div>

    </div>
</body>
</html>

ofilippov avatar Apr 20 '14 17:04 ofilippov

Indeed, that was a bug. Just fixed it internally. The fix will be available in 3.0.1.

din avatar Apr 20 '14 17:04 din

Try your example now. It should work under 3.0.1 build.

din avatar Apr 27 '14 07:04 din

Nope, still doesn't work. Version 3.0.1.

ofilippov avatar Apr 27 '14 08:04 ofilippov

Oh sorry, I am mistaken. It should work under 3.0.2. I thought I included the fix into 3.0.1, but it was submitted to the MAS much earlier, so I included it into 3.0.2. We will push it to the MAS soon, though.

din avatar Apr 27 '14 08:04 din

I've tested it on a 3.0.2 Works fine, thanks! Bug can be closed now.

ofilippov avatar Apr 30 '14 08:04 ofilippov

Sorry, I have to reopen this one. I've found that there are no mousemove events when I move mouse over jacket with left mouse button pressed. So, I cannot emulate dragging of control on jacket.

ofilippov avatar Apr 30 '14 18:04 ofilippov

Could you please write an email to [email protected] or [email protected], so I can send you a test bundle of the next public release? That would create some space to properly test your code and to fix our issues.

din avatar Apr 30 '14 21:04 din