I have a piece of code which runs on window resize. I am pulling the width
, and the outerWidth
of a input text element.
This process works fine in every browser, except Webkit, which returns the proper result from outerWidth
, but the result from width
never changes from the on load original.
This is actual console output from my script when resizing the browser window (This is Chrome, but the same happens in Safari 4):
outerWidth: 772
width: 772
outerWidth: 773
width: 772
outerWidth: 773
width: 772
outerWidth: 794
width: 772
outerWidth: 794
width: 772
outerWidth: 815
width: 772
outerWidth: 815
width: 772
outerWidth: 820
width: 772
outerWidth: 837
width: 772
Has anyone experienced this before? Do you know why it happens? And most importantly, do you know how to work around it? :)
Thank you.