 		self.placeholder = placeholder
 		self.action = action
 		self.enabled = enabled
+		self.autofocus = autofocus
+		self.forceValueWhileEditing = forceValueWhileEditing
 		super.init(frame: CGRect(x: 0, y: 0, width: 100, height: 23))
 		
 		self.inputDelegate.action = { [unowned self] field in

			cell?.placeholderString = placeholder ?? ""

			if let text = text {
				if text != textField.stringValue {
					textField.stringValue = text
				}
			}

		cell?.placeholderString = placeholder ?? ""
		return field
	}

	public override func elementDidRealize(realizedSelf: RealizedElement) {
		// Call super first so that we still end up grabbing focus even if a 
		// child has autofocus as well.
		super.elementDidRealize(realizedSelf)

		if autofocus {
			let window = realizedSelf.view.window!
			window.makeFirstResponder(realizedSelf.view)
		}
	}
}

extension Input {
	public func autofocus(f: Bool) -> Self {
		autofocus = f
		return self
	}
}
