minddust / bootstrap-progressbar

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

Text bug when resizing browser window #53

Open casually-creative opened 9 years ago

casually-creative commented 9 years ago

Hey, when implementing my needs of your progressbar plugin, I came across a bug. I wrote some code to initially hide my progress bar so I could show it at a later point. It works like a charm but I randomly see a piece of my 'amount_format' text displayed at the very left of the bar.

I created a fiddle to simulate the problem: http://jsfiddle.net/kLvje0o6/4/

It happens almost randomly but I found a way to reproduce it 100%. if you risize the window between my function call 'progressTo(0)' and 'progressTo(1)', it will show.

I wrote a timeout in the fiddle, just resize your browser window (width or height) in the 4 seconds of the timeout when you run the fiddle.

Interesting to note that, if you resize it again after that, the piece of text dissapears again.

Screenshot: http://oi62.tinypic.com/2lsbm7k.jpg

casually-creative commented 9 years ago

It is probably a bug due to the fact I set 'display' to 'none' and the plugin can't access the bar's width anymore. If this is the case, any suggestion on how I should properly hide my progressbar?

bryanmorgandrms commented 8 years ago

I am also seeing this issue; in my case, it's because the progress bar is inside a collapsible bootstrap panel, which is collapsed by default. Upon expanding the panel, you get the duplicated offset text, but after resizing the window while the panel is open, it fixes itself.