3
Copyright 2012 Yahoo! Inc. All rights reserved.
4
Licensed under the BSD License.
5
http://yuilibrary.com/license/
7
YUI.add('widget-base-ie', function(Y) {
10
* IE specific support for the widget-base module.
12
* @module widget-base-ie
14
var BOUNDING_BOX = "boundingBox",
15
CONTENT_BOX = "contentBox",
17
OFFSET_HEIGHT = "offsetHeight",
20
heightReallyMinHeight = IE < 7,
21
bbTempExpanding = Y.Widget.getClassName("tmp", "forcesize"),
22
contentExpanded = Y.Widget.getClassName("content", "expanded");
24
// TODO: Ideally we want to re-use the base _uiSizeCB impl
25
Y.Widget.prototype._uiSizeCB = function(expand) {
27
var bb = this.get(BOUNDING_BOX),
28
cb = this.get(CONTENT_BOX),
29
borderBoxSupported = this._bbs;
31
if (borderBoxSupported === undefined) {
32
this._bbs = borderBoxSupported = !(IE && IE < 8 && bb.get("ownerDocument").get("compatMode") != "BackCompat");
35
if (borderBoxSupported) {
36
cb.toggleClass(contentExpanded, expand);
39
if (heightReallyMinHeight) {
40
bb.addClass(bbTempExpanding);
43
cb.set(OFFSET_HEIGHT, bb.get(OFFSET_HEIGHT));
45
if (heightReallyMinHeight) {
46
bb.removeClass(bbTempExpanding);
49
cb.setStyle(HEIGHT, EMPTY_STR);
55
}, '3.5.1' ,{requires:['widget-base']});