diff --git a/spec/atom/root-view-spec.coffee b/spec/atom/root-view-spec.coffee index ba49a116e..d9f31ac6f 100644 --- a/spec/atom/root-view-spec.coffee +++ b/spec/atom/root-view-spec.coffee @@ -14,7 +14,7 @@ describe "RootView", -> expect(rootView.vertical.children().length).toBe 2 describe "toggleFileFinder", -> - fit "shows the FileFinder when it is not on screen and hides it when it is", -> + it "shows the FileFinder when it is not on screen and hides it when it is", -> #expect(rootView.find('.file-finder')).not.toExist() # rootView.toggleFileFinder() # expect(rootView.find('.file-finder')).toExist() diff --git a/src/stdlib/template/builder.coffee b/src/stdlib/template/builder.coffee index 76204affe..737efb724 100644 --- a/src/stdlib/template/builder.coffee +++ b/src/stdlib/template/builder.coffee @@ -42,12 +42,12 @@ class Builder @document.push(new CloseTag(name)) subview: (outletName, template, params) -> - subviewId = ++@subviewCount - @tag 'div', subview: subviewId + subviewId = _.uniqueId('subview') + @tag 'div', id: subviewId @postProcessingFns.push (view) -> subview = template.build(params) subview.attr('outlet', outletName) - view.find("div[subview=#{subviewId}]").replaceWith(subview) + view.find("div##{subviewId}").replaceWith(subview) elementIsVoid: (name) -> name in @constructor.elements.void @@ -65,7 +65,6 @@ class Builder @document.push(new Text(string)) reset: -> - @subviewCount = 0 @document = [] @postProcessingFns = []