box-sizing-polyfill
box-sizing-polyfill copied to clipboard
Handle resizes on parent element
This change handles an issue with the box-sizing polyfill. If there is an element X with box-sizing = content-box and it has a child element Y with box-sizing = border-box, if the dimensions of X change, the dimensions of Y are not updated. The proposed fix attaches an "onresize" event to the corresponding parent element and the issue is resolved.
hi,kapitancho
nice code....
I 'm puzzled about the code works on ie6....
after size of the element's parent changed,the update function will throw a exception about "element......" so i have to add a param to hold the original element....
and it works well on ie 7 ...
Can you tell me some thing about this problem?
Hello lsjwzh, when I test on my IE6, I have no JavaScript errors. What is the exact exception that you get?
Hello ,kapitancho Thanks for your reply
The problem happened about a month ago in an old project...i cannot remember the exact info.....and it seems not happen on all ie 6 machine,.....
i guess the reason is that i used element.onResize instead of attachEvent,that makes update function run in an error context....
if i get it , i will send it to you as soon as possible....