| Page 1 of 1 | [ 3 posts ] |
MarcYUI Contributor
|
Hi,
I'm having some issues with a component that uses offsetWidth. In some cases with 3.5.0pr4 the offsetWidth doesn't seem to be updated. I haven't been able to pinpoint when it happens, but when I do something like this Code: <span class="yui3-slidecheckbox-labelOn"><label><span>YES</span></label></span> var leftX = this._labelOnNode.one('span').get('offsetWidth');//19 var width = this._labelOnNode.get('offsetWidth');//19 this._labelOnNode.one('span').setStyle('width',33); width = this._labelOnNode.get('offsetWidth');//still 19 It seem labelOnNode offsetWidth doesn't get updated. I can reliably reproduce this in our production environment, but with the component page for gallery-slidecheckbox it works correctly. I'm just wondering if anything changed to the way offsetWidth is used or updated. Up to and including 3.5.0pr2, this worked normally. Cheers, Marc |
|
This is expected behavior. Styling the width of an inline element has no effect. Set the SPAN to display:block and the width will be respected.
|
MarcYUI Contributor
|
Ok, I made some changes to the component, hopefully this will resolve the issue. It does remain a little unsettling that in 3.5.0pr4 it suddenly doesn't work as before.
|
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group