Skip to content

Commit

Permalink
fix ariatemplates#142 height and width attributes on html template
Browse files Browse the repository at this point in the history
  • Loading branch information
Gprasad committed Dec 10, 2012
1 parent 0d42051 commit d775b95
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/aria/templates/Layout.js
Expand Up @@ -150,8 +150,7 @@
};

/**
* This class listens to changes in viewport size and raises an event for templates to
* refresh.
* This class listens to changes in viewport size and raises an event for templates to refresh.
* @singleton
*/
Aria.classDefinition({
Expand Down Expand Up @@ -261,8 +260,17 @@
}
width = __getIntSize(width, "width");
height = __getIntSize(height, "height");
domElt.style.width = (width == null ? '' : width + 'px');
domElt.style.height = (height == null ? '' : height + 'px');
var domStyle = domElt.style;
if (width) {
domStyle.width = width + 'px';
} else if (domStyle.width == '100%') {
domStyle.width = '';
}
if (height) {
domStyle.height = height + 'px';
} else if (domStyle.height == '100%') {
domStyle.height = '';
}
// We are not separating overflowX and overflowY here because, in Firefox, a vertical
// scrollbar sometimes appears when using overflowX=hidden without specifying overflowY

Expand Down

0 comments on commit d775b95

Please sign in to comment.