minddust / bootstrap-progressbar

progressbar interactions for twitter bootstrap 2 & 3
www.minddust.com/project/bootstrap-progressbar
MIT License
577 stars 160 forks source link

progress bar bootstrap 3 not working properly in Chrome/Opera #45

Closed yurii-polishchuk closed 9 years ago

yurii-polishchuk commented 9 years ago

Strange bug, progress bar is not changing dynamicly in Chrome 40 , Opera.

Code from demo:

<div class="progress">
    <div class="progress-bar" role="progressbar"></div>
</div>
<button type="button" id="trigger-0">0</button>
<button type="button" id="trigger-50">50</button>
<button type="button" id="trigger-100">100</button>

$(document).ready(function() {
    var $pb = $('.progress .progress-bar');
    $('#m-multi-trigger-0').click(function() {
        $pb.attr('data-transitiongoal', 0).progressbar({display_text: 'center'});
    });
    $('#m-multi-trigger-50').click(function() {
        $pb.attr('data-transitiongoal', 50).progressbar({display_text: 'center'});
    });
    $('#m-multi-trigger-100').click(function() {
        $pb.attr('data-transitiongoal', 100).progressbar({display_text: 'center'});
    });
});

When I am clicking button, progres bar % is not changing (ui also). But when i am clicking few more times at a row, some progress is strangely changing...

Can anyone help to solve, and answer the question what is wrong ? o_O Thanks!

P.S.Firefox/IE - all ok.

yurii-polishchuk commented 9 years ago

Also in my code, i dynamically changing %, and progress bar is not even working...

but when i duplicate code with timeouts, Chrome starts to show progress bar normally, for example:

progressMain.attr('data-transitiongoal', progress.percentage).progressbar({display_text: 'fill'});
setTimeout(function(){progressMain.attr('data-transitiongoal', progress.percentage).progressbar({display_text: 'fill'});},300);
setTimeout(function(){progressMain.attr('data-transitiongoal', progress.percentage).progressbar({display_text: 'fill'});},100);
minddust commented 9 years ago

hi @omatic-hacker

did you noticed the same behavior on the demo page or just in your example?

yurii-polishchuk commented 9 years ago

Hello,sorry for such a strange issue, i thought it's not a problem of bootstrap-progressbar ;) Anyway, thank you for your project and time your spending on it!

On topic: yes, in demo too. I tested on last example v.3.3.0 multi trigger 0 50 100

For the first time everything is ok, but try to click buttons 0 50 100 very quickly few times one after another, then Chrome is getting crazy and "lag". After that, even if you click button slowly, progress bar is strangely showing percentage. Then you need to reload page or even restart the browser, and everything back to normal.

P.S. i think it's a chrome problem, because in firefox all ok.

yurii-polishchuk commented 9 years ago

P.P.S. lately i was investigating it on chromium builds, and on build 42.0.2293.0 everything works fine and "lags" don't appear.

So if anyone know what is wrong, please provide link, for now i am closing issue.

Thank's for answers!

minddust commented 9 years ago

just tested the demo with chrome 40.0.2214.94 on mac. looks fine to me.

maybe this was a local problem? mix of empty ram --> laggy browser?

you're welcome :)