[Jifty-commit] r4668 - in jifty/trunk: share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Dec 13 00:54:14 EST 2007
Author: sartak
Date: Thu Dec 13 00:54:05 2007
New Revision: 4668
Modified:
jifty/trunk/ (props changed)
jifty/trunk/share/web/static/js/jifty.js
Log:
r48963 at onn: sartak | 2007-12-13 00:53:52 -0500
Normalize placeholder text because sometimes one has \r\n and the other has \n. Ugh.
Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js (original)
+++ jifty/trunk/share/web/static/js/jifty.js Thu Dec 13 00:54:05 2007
@@ -1491,6 +1491,10 @@
// If the element's text isn't the same as its placeholder text, then the
// browser screwed up and didn't clear our placeholder. Opera on Mac with
// VirtueDesktops does this some times, and I lose data.
+ // These are normalized because sometimes one has \r\n and the other has \n
+ elt.value = elt.value.replace(/\r/g, '');
+ elt.placeholderText = elt.placeholderText.replace(/\r/g, '');
+
if(Jifty.Placeholder.hasPlaceholder(elt) && elt.value == elt.placeholderText) {
elt.value = '';
Element.removeClassName(elt, 'placeholder');
More information about the Jifty-commit
mailing list