 
     element = @getDialogForAttributeName(attributeName)
     input = getInputForDialog(element, attributeName)
+    @delegate?.toolbarWillShowDialog(input?)
+    element.classList.add("active")
 
-    @delegate?.toolbarWillShowDialog(input?)
-
-    element.classList.add("active")
-    input?.value = @attributes[attributeName] ? ""
-    input?.select()
+    if input
+      input.removeAttribute("disabled")
+      input.value = @attributes[attributeName] ? ""
+      input.select()
 
   setAttribute: (dialogElement) ->
     attributeName = getAttributeName(dialogElement)


  constructor: (@element) ->
    @attributes = {}

    handleEvent "mousedown", onElement: @element, matchingSelector: actionButtonSelector, withCallback: @didClickActionButton
    handleEvent "mousedown", onElement: @element, matchingSelector: attributeButtonSelector, withCallback: @didClickAttributeButton


  hideDialog: ->
    @element.querySelector(activeDialogSelector)?.classList.remove("active")
    @resetDialogInputs()
    @delegate?.toolbarDidHideDialog()

  resetDialogInputs: ->
    for input in @element.querySelectorAll(dialogInputSelector)
      input.setAttribute("disabled", "disabled")
      input.classList.remove("validate")

  getDialogForAttributeName: (attributeName) ->
    @element.querySelector(".dialog[data-attribute=#{attributeName}]")
