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

Handle resizes on parent element #28

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

Conversation

kapitancho
Copy link

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.

@lsjwzh
Copy link

lsjwzh commented Mar 18, 2013

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?

@kapitancho
Copy link
Author

Hello lsjwzh,
when I test on my IE6, I have no JavaScript errors. What is the exact exception that you get?

@lsjwzh
Copy link

lsjwzh commented Mar 19, 2013

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....

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.

2 participants