Skip to content

Missing semi-colon when new style rule is added #141

Closed
@hwillson

Description

@hwillson

Migrating this confirmed bug (has a workaround) over from meteor/meteor#4681 (reported by @peernohell).


In a DOM element, if you have a rule with a value that are conditioned by a helper and this helper return an empty value, the rule is removed. But if the value reactively change the rule is append in the end of the style attribute. But if it didn't finish by a semi colon, Balze didn't add it and the style is brocken.

For an exemple you can see this meteorpad: http://meteorpad.com/pad/r4FyvBwHryBWkK9vm/Leaderboard

Some detail:
the template:

<div id="logo" style="background-color:{{bgColor}};padding: 10px">change my color</div>

The DOM after loading:

<div id="logo" style="padding: 10px">change my color</div>

The DOM after clicking a buton that change {{bgColor}} to red:

<div id="logo" style="padding: 10px background-color:red;">change my color</div>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions