mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-10 20:57:11 +00:00
Fixed: setting any binding on a text field - even on an attribute like 'hidden' - would clear its placeholder string.
This commit is contained in:
@@ -792,10 +792,14 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
|
||||
|
||||
- (void)_setCurrentValueIsPlaceholder:(BOOL)isPlaceholder
|
||||
{
|
||||
// The initial _currentValueIsPlaceholder is null so convert it to NO for comparison purposes.
|
||||
if (!!_currentValueIsPlaceholder === isPlaceholder)
|
||||
return;
|
||||
|
||||
if (isPlaceholder)
|
||||
{
|
||||
// Save the original placeholder value so we can restore it later
|
||||
// Only do this if the placeholder is not already overridden because the bindings logic might call this method
|
||||
// Only do this if the placeholder is not already overridden because the bindings logic might call this method
|
||||
// several times and we don't want the bindings placeholder to ever become the original placeholder
|
||||
if (!_currentValueIsPlaceholder)
|
||||
_originalPlaceholderString = [self placeholderString];
|
||||
|
||||
Reference in New Issue
Block a user