New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default empty route event fires twice on page load #1185

Closed
Natallia-Bahlai opened this Issue Jul 31, 2014 · 4 comments

Comments

Projects
None yet
5 participants
@Natallia-Bahlai

I have this issue reproduced both locally (like it is written in daffl's code) and on http://jsfiddle.net/qYdwR/1553/.
With the code below default empty route event is fired twice:

$(function() {
        var Routing = can.Control({
            'route': function() {
                console.log('route');
            }
        });
        var routing = new Routing();
        can.route.ready();
    });

There was similar issue: #1024

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jul 31, 2014

Contributor

What browser are you using? How is it running locally?

Contributor

justinbmeyer commented Jul 31, 2014

What browser are you using? How is it running locally?

@Natallia-Bahlai

This comment has been minimized.

Show comment
Hide comment
@Natallia-Bahlai

Natallia-Bahlai Jul 31, 2014

I am using Chrome and it the code is running within visualforce page. But the page source is the same as below:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>can.route demo</title>
</head>
<body>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://canjs.us/release/latest/can.jquery.js"></script>

<script type='text/javascript'>
    $(function() {
        var Routing = can.Control({
            'route': function() {
                console.log('route');
            }
        });
        var routing = new Routing();
        can.route.ready();
    });
</script>
</body>
</html>

I am using Chrome and it the code is running within visualforce page. But the page source is the same as below:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>can.route demo</title>
</head>
<body>
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://canjs.us/release/latest/can.jquery.js"></script>

<script type='text/javascript'>
    $(function() {
        var Routing = can.Control({
            'route': function() {
                console.log('route');
            }
        });
        var routing = new Routing();
        can.route.ready();
    });
</script>
</body>
</html>
@moschel

This comment has been minimized.

Show comment
Hide comment
@moschel

moschel Jul 31, 2014

Contributor

I think I have seen this before, I'll take a look at this one.

On Thu, Jul 31, 2014 at 12:14 PM, Natallia notifications@github.com wrote:

I am using Chrome and it the code is running within visualforce page. But
the page source is the sam e as

<title>can.route demo</title> <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="http://canjs.us/release/latest/can.jquery.js"></script> <script type='text/javascript'> $(function() { var Routing = can.Control({ 'route': function() { console.log('route'); } }); var routing = new Routing(); can.route.ready(); }); </script>


Reply to this email directly or view it on GitHub
#1185 (comment).

Brian Moschel[image: Bitovi]
Development | Training | Support
Bitovi.com http://www.bitovi.com/ | Twitter: @bitovi
http://twitter.com/bitovi

Contributor

moschel commented Jul 31, 2014

I think I have seen this before, I'll take a look at this one.

On Thu, Jul 31, 2014 at 12:14 PM, Natallia notifications@github.com wrote:

I am using Chrome and it the code is running within visualforce page. But
the page source is the sam e as

<title>can.route demo</title> <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="http://canjs.us/release/latest/can.jquery.js"></script> <script type='text/javascript'> $(function() { var Routing = can.Control({ 'route': function() { console.log('route'); } }); var routing = new Routing(); can.route.ready(); }); </script>


Reply to this email directly or view it on GitHub
#1185 (comment).

Brian Moschel[image: Bitovi]
Development | Training | Support
Bitovi.com http://www.bitovi.com/ | Twitter: @bitovi
http://twitter.com/bitovi

@stevenvachon

This comment has been minimized.

Show comment
Hide comment
@stevenvachon

stevenvachon Jul 31, 2014

Contributor

#587 and #656 might be related

Contributor

stevenvachon commented Jul 31, 2014

#587 and #656 might be related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment