Permalink
Browse files

A fix to a *small* bug that appears when a border is applied to the p…

…rogress bar. If the value of the progress bar is set to zero, the progress bar increases in width slightly, until the value is changed to a non-zero value. Fixed by changing offsetWidth to clientWidth.
  • Loading branch information...
1 parent 5cac9d3 commit 601435c7b87a4243eabd96fb2eceb020951fbe72 Zoltan Hawryluk committed Jan 3, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 progress-polyfill.js
View
@@ -156,9 +156,8 @@ var self = window.ProgressPolyfill = {
progress.removeAttribute('aria-valuenow');
}
}
-
if(progress.position !== -1) {
- progress.style.paddingRight = progress.offsetWidth * (1-progress.position) + 'px';
+ progress.style.paddingRight = progress.clientWidth * (1-progress.position) + 'px';
}
},

0 comments on commit 601435c

Please sign in to comment.