mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-21 05:59:22 +00:00
Fix for setStringValue on CPTextField being broken if first responder.
First commit by Nick Takayama! Thanks! [#100 state:resolved]
This commit is contained in:
1 parent
816d0d3636
commit
c2b1130e23
1 file changed
+11
-4
+11
-4
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user