Fix for setStringValue on CPTextField being broken if first responder.

First commit by Nick Takayama! Thanks!

[#100 state:resolved]
This commit is contained in:
Ross Boucher committed 2008-10-09 23:15:18 -07:00
1 parent 816d0d3636
commit c2b1130e23
1 file changed
+11 -4
+11 -4
View File
@@ -460,10 +460,17 @@ var _CPTextFieldSquareBezelColor = nil;
else if (aValue)
displayString += aValue;
if (CPFeatureIsCompatible(CPJavascriptInnerTextFeature))
_DOMTextElement.innerText = displayString;
else if (CPFeatureIsCompatible(CPJavascriptTextContentFeature))
_DOMTextElement.textContent = displayString;
if ([[self window] firstResponder] == self)
{
[[self class] _inputElement].value = displayString;
}
else
{
if (CPFeatureIsCompatible(CPJavascriptInnerTextFeature))
_DOMTextElement.innerText = displayString;
else if (CPFeatureIsCompatible(CPJavascriptTextContentFeature))
_DOMTextElement.textContent = displayString;
}
#endif
}