[Jifty-commit] jifty branch, master, updated. 4b42bec2cde45ede5d678b618898eee0b056d644
Jifty commits
jifty-commit at lists.jifty.org
Fri Jul 2 11:20:27 EDT 2010
The branch, master has been updated
via 4b42bec2cde45ede5d678b618898eee0b056d644 (commit)
from 417740b457e7153ad97eba00ea7754b220342edc (commit)
Summary of changes:
share/web/static/js/jifty.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 4b42bec2cde45ede5d678b618898eee0b056d644
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 2 11:20:13 2010 -0400
Don't modify the form value in-place when checking placeholder text
In IE7 and 8, the \r's we just removed are put back when we set the
textbox value, causing the placeholder to not match and stay visible
on focus.
diff --git a/share/web/static/js/jifty.js b/share/web/static/js/jifty.js
index fbc4431..38a532c 100644
--- a/share/web/static/js/jifty.js
+++ b/share/web/static/js/jifty.js
@@ -1893,9 +1893,9 @@ jQuery.extend(Jifty.Placeholder, {
// VirtueDesktops does this some times, and I lose data.
// These are normalized because sometimes one has \r\n and the other has \n
if (Jifty.Placeholder.hasPlaceholder(elt)) {
- elt.value = elt.value.replace(/\r/g, '');
- elt.placeholderText = elt.placeholderText.replace(/\r/g, '');
- if (elt.value == elt.placeholderText)
+ var value = elt.value.replace(/\r/g, '');
+ var placeholder = elt.placeholderText.replace(/\r/g, '');
+ if (value == placeholder)
jQuery(elt).removeClass('placeholder').val('');
}
}
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list