Skip to content
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

Remove resize event - causes browser tab to crash. #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paalwilliams
Copy link

Hi there!

I noticed that the initializing during the resize event was causing my browser tab to crash in Chromium, Firefox, and Safari.

To replicate:

  • Use webticker according to the documentation
  • Resize quickly to the minimum browser width
  • attempt to resize the browser to full width again.

Listening for the resize event, continuing it, and restarting it once completed like the following in my code seemed to stop this behaviour, with no noticeable errors in functionality.

$('#webTicker').webTicker({    height:'75px', 
        duplicate: true, 
        rssfrequency: 0, 
        startEmpty: false, 
        hoverpause: false, 
        speed: 20,
        height: '50px'
    })

$(window).resize(() => {
    $('#webTicker').webTicker('stop')
    clearTimeout(window.resizedFinished);
    window.resizedFinished = setTimeout(function(){
        $('#webTicker').webTicker('cont')
    }, 250);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant