     if self.displayMode == .View {
       return
     }
-    self.isEdtiting = true
     self.textField.becomeFirstResponder()
     self.unselectAllTokenViewsAnimated(false)
+    self.repositionViews()
   }
   
   public func endEditing() {
     self.resignFirstResponder()
-    self.isEdtiting = false
+    self.repositionViews()
   }
 }
 

    self.textField.autocapitalizationType = self.autocapitalizationType;
    self.textField.delegate = self
    self.textField.addTarget(self, action: #selector(FA_TokenInputView.onTextFieldDidChange(_:)), forControlEvents: .EditingChanged)
    self.addSubview(self.textField)
    
    self.fieldLabel = UILabel(frame: CGRectZero)

      availableWidthForTextField = rightBoundary - curX
    }
    
    if (!self.editing && curY > yPositionForLastToken && !self.tokens.isEmpty) {
      // check if there is another token on the line and if not we should remove the line height
      curY -= FA_TokenInputView.STANDARD_ROW_HEIGHT+FA_TokenInputView.VSPACE
      totalHeight -= FA_TokenInputView.STANDARD_ROW_HEIGHT
    }
    
    if self.editing {
      self.textField.frame = CGRectMake(curX, curY, availableWidthForTextField, FA_TokenInputView.STANDARD_ROW_HEIGHT)
    } else {
      self.textField.frame = CGRectZero
    }
    
    let oldContentHeight = self.intrinsicContentHeight
    self.intrinsicContentHeight = CGRectGetMaxY(self.textField.frame)+FA_TokenInputView.PADDING_BOTTOM
    self.invalidateIntrinsicContentSize()
    
    if (oldContentHeight != self.intrinsicContentHeight) {
