Bug In Meteor/semantic-ui?
the usage of a semantic-ui modal window does not work if the root-element is a meteor template: package: semantic-ui-css Error reproduction: hello.html:
Solution 1:
The root element being a template is not the problem. The problem is having the BODY
tag in the template. You wind up with two BODY
tags, which leads to having two $dimmers. So when $dimmer.on is called, it is actually an array and the semantic-ui code would have to call $dimmer[i].on (where i would be 0 and 1) and it doesn't work that way.
So change hello.html to:
<templatename="hello"><divclass="delete openModal">OPEN<iclass="close icon"></i></div><divid="modalView"class="ui modal"><divclass="content"><divclass="ui fluid input">
Modal Error Test
</div></div><divclass="actions"><divclass="ui button cancel">Cancel</div><divclass="ui button ok">OK</div></div></div></template><templatename="navigation"><divclass="ui menu"><aclass="item"id="home"href="/"><iclass="home icon"></i> welcome
</a></div></template>
And create a layout (layout.html):
<head><title>Hello Error</title></head><body><h1>Reproduce error</h1>
{{> navigation}}
</body>
That works.
Of course you could just remove the BODY
tag from hello.html:
<templatename="hello"><head><title>Hello Error</title></head><h1>Reproduce error</h1>
{{> navigation}}
<divclass="delete openModal">OPEN<iclass="close icon"></i></div><divid="modalView"class="ui modal"><divclass="content"><divclass="ui fluid input">
Modal Error Test
</div></div><divclass="actions"><divclass="ui button cancel">Cancel</div><divclass="ui button ok">OK</div></div></div></template><templatename="navigation"><divclass="ui menu"><aclass="item"id="home"href="/"><iclass="home icon"></i> welcome
</a></div></template>
That works too, but I think the first approach is the clean/Meteor way.
Post a Comment for "Bug In Meteor/semantic-ui?"