Skip to content

Instantly share code, notes, and snippets.

Created October 22, 2008 21:38
Show Gist options
  • Save anonymous/18812 to your computer and use it in GitHub Desktop.
Save anonymous/18812 to your computer and use it in GitHub Desktop.
@implementation DTTextField : CPTextField
{
}
+ (DOMElement)_inputElement
{
var CPTextFieldDOMInputElement = nil;
if (!CPTextFieldDOMInputElement)
{
CPTextFieldDOMInputElement = document.createElement("input");
CPTextFieldDOMInputElement.type = "search";
CPTextFieldDOMInputElement.style.position = "absolute";
CPTextFieldDOMInputElement.style.top = "0px";
CPTextFieldDOMInputElement.style.left = "0px";
CPTextFieldDOMInputElement.style.width = "100%"
CPTextFieldDOMInputElement.style.height = "100%";
CPTextFieldDOMInputElement.style.border = "0px";
CPTextFieldDOMInputElement.style.padding = "0px";
CPTextFieldDOMInputElement.style.whiteSpace = "pre";
CPTextFieldDOMInputElement.style.background = "Yellow";
CPTextFieldDOMInputElement.style.outline = "none";
CPTextFieldDOMInputElement.style.paddingLeft = HORIZONTAL_PADDING - 1.0 + "px";
CPTextFieldDOMInputElement.style.paddingTop = TOP_PADDING - 2.0 + "px";
}
return CPTextFieldDOMInputElement;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment