From dd80226c2301917acabb0a48ba2c7efbd10f76f6 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 12 Jan 2015 17:39:07 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"Handle=20addition/removal=20of=20?= =?UTF-8?q?=E2=80=98gutter-hidden=E2=80=99=20attribute"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 69262362683be6f79a1b05735b00b1011740acb0. There seems to be some bug or timing issue that prevents the attachedCallback from being called in all cases when the attributeChangedCallback is defined. We can figure this out at a later time. --- spec/text-editor-element-spec.coffee | 11 ----------- src/text-editor-element.coffee | 4 ---- 2 files changed, 15 deletions(-) diff --git a/spec/text-editor-element-spec.coffee b/spec/text-editor-element-spec.coffee index 858d835a5..cbcc5fc16 100644 --- a/spec/text-editor-element-spec.coffee +++ b/spec/text-editor-element-spec.coffee @@ -30,17 +30,6 @@ describe "TextEditorElement", -> element = jasmineContent.firstChild expect(element.getModel().getText()).toBe 'testing' - describe "when attributes change", -> - it "honors addition/removal of the 'gutter-hidden' attribute", -> - element = new TextEditorElement - expect(element.getModel().isGutterVisible()).toBe true - - element.setAttributeNode(document.createAttribute("gutter-hidden")) - expect(element.getModel().isGutterVisible()).toBe false - - element.removeAttribute('gutter-hidden') - expect(element.getModel().isGutterVisible()).toBe true - describe "when the model is assigned", -> it "adds the 'mini' attribute if .isMini() returns true on the model", -> element = new TextEditorElement diff --git a/src/text-editor-element.coffee b/src/text-editor-element.coffee index 3e4f7924e..38b980b65 100644 --- a/src/text-editor-element.coffee +++ b/src/text-editor-element.coffee @@ -71,10 +71,6 @@ class TextEditorElement extends HTMLElement @unmountComponent() @emitter.emit("did-detach") - attributeChangedCallback: (name, oldValue, newValue) -> - if name is 'gutter-hidden' - @getModel().setGutterVisible(not @hasAttribute('gutter-hidden')) - initialize: (model) -> @setModel(model) this