Height and width styles are not taken into account in attributes of html templates #142

Closed
captainbrosset opened this Issue Sep 19, 2012 · 5 comments

7 participants

@captainbrosset

When defining the style attributes in a html:template, seems like the height and width properties are either parsed out or removed afterwards.

Consider this code:

    {@html:Template { 
      "classpath" : "app.rm.templates.pages.Workspace",
      "attributes" : {
        "classList" : ["fill-height"],
        style: "border:1px solid red;height:10px;padding:10px;width:500px;"
      }
    }/}

Once the dom is generated, here is the result:

<div style="border: 1px solid red; padding: 10px;" class="fill-height CSS4" id="w1" _template="app.rm.templates.pages.Workspace" atdelegate="d10">...</div>

Thanks for your help

@benouat benouat was assigned Oct 15, 2012
@benouat
Aria Templates member

Problem is coming from the layout manager that does not check that a width or/and an height are already there on the wrapper div.

It just try to recompute some sizes, even if you don't use some, and erase any existing value

@benouat benouat added a commit to benouat/ariatemplates that referenced this issue Oct 17, 2012
@benouat benouat If no new sizes are computed, we just don't override the original one…
…s. Fixes #142
a35cd99
@benouat benouat closed this in a35cd99 Oct 17, 2012
@jakub-g

Reverted by the commit d542653 due to introducing a regression on a demo page (unable to scroll, cross-browser).

@jakub-g jakub-g reopened this Oct 19, 2012
@Gprasad Gprasad was assigned Dec 4, 2012
@susant123 susant123 pushed a commit to susant123/ariatemplates that referenced this issue Dec 10, 2012
sbehera fix #142 height and width style attribute in html templates f3ef544
@Gprasad Gprasad added a commit to Gprasad/ariatemplates that referenced this issue Dec 10, 2012
@Gprasad Gprasad fix #142 height and width attributes on html template d775b95
@flongo flongo closed this in dd0c8b7 Dec 10, 2012
@flongo

Commit dd0c8b7 is linked to this issue.

@divdavem
Aria Templates member

@susant123 Wouldn't it be a good idea to add a unit test so that there is no regression in the future?

Please also have a look to my comment here, and maybe find a fix for that case as well.

@divdavem divdavem reopened this Dec 10, 2012
@susant123 susant123 pushed a commit to susant123/ariatemplates that referenced this issue Dec 11, 2012
sbehera fix #142 height and width style attribute in html templates
fix #142 height and width style attribute in html templates (Resetting height and width to blank once loading indicator is removed)

fix #142 height and style attribute in html templates(Resetting height and width to blank once loading indicator is removed)
a40d1e8
@susant123 susant123 pushed a commit to susant123/ariatemplates that referenced this issue Dec 14, 2012
sbehera Revert "fix #142 height and width style attribute in html templates"
This reverts commit a40d1e8.
6902d2f
@piuccio piuccio added a commit that closed this issue Dec 18, 2012
sbehera fix #142 height and width attributes
height and width style attribute in html templates
695fbfa
@piuccio piuccio closed this in 695fbfa Dec 18, 2012
@divdavem
Aria Templates member

See my remark in 695fbfa

@divdavem divdavem reopened this Dec 18, 2012
@divdavem divdavem added a commit to divdavem/ariatemplates that referenced this issue Dec 18, 2012
@divdavem divdavem fix #142 height and width attributes 30c0a8f
@divdavem divdavem closed this in 3150ef7 Dec 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment