You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
It seems as though it's not possible to retroactively remove the character, looks like we might have to revert the behaviour to using a nbsp.
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.
-
Sencha User
Out of curiosity, could you give specifics on what renders it unable to be retroactively removed? Due to character encoding, or?
I haven't looked at the issue, but a shot in the dark here on an assumption as to the underlying 'why' -- what about converting the value string or an exploded array of the string characters into their ascii code equivalents, then doing a string replace or removal from array of the zero-width space?
-
It just doesn't appear in the string, if you try indexOf('...') it's -1, even though it shows up on the server.
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.
-
try searching for unicode character \00200B
scratch that. doesn't work.
interestingly though if you do htmleditorRef.getValue().length in Firefox after the htmleditor is initialised, it returns 1.
see next post.
Last edited by mystix; 8 Jul 2009 at 7:45 PM.
Reason: edit
-
you need to search for the unicode equivalent of the <wbr> (i.e. word break / zero width space) tag.
try this in the dynamic forms example immediately after focusing the HTMLEditor in Form 3:
Code:
Ext.getCmp('bio').getValue().length; // returns 1 because the ​ (i.e. <wbr>) tag is still there
Ext.getCmp('bio').getValue().indexOf('\u200b'); // returns 0. YAY!
-
alritey this should do the trick:
Code:
Ext.override(Ext.form.HtmlEditor, {
// private
defaultValue: (Ext.isOpera || Ext.isIE6) ? ' ' : '​',
cleanHtml: function(html) {
var dv = this.defaultValue;
html = String(html);
// if (html.length > 5) {
if (Ext.isWebKit) { // strip safari nonsense
html = html.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi, '');
}
// }
if (html.charCodeAt(0) == dv.replace(/\D/g, '')) {
html = html.substring(1);
}
return html;
}
});
-
[ friendly bump ]
to get this going again
-
Sencha User

Originally Posted by
mystix
[ friendly bump ]
to get this going again
Why not just use " " everywhere?
Code:
*** ext-all-debug.js Wed Jul 01 19:00:09 2009
--- ext-all-debug_patched.js Mon Jul 13 13:26:15 2009
***************
*** 57367,57373 ****
/**
* @cfg {String} defaultValue A default value to be put into the editor to resolve focus issues (defaults to ? (Zero-width space), (Non-breaking space) in Opera and IE6).
*/
! defaultValue: (Ext.isOpera || Ext.isIE6) ? ' ' : '&??#8203;',
// private properties
actionMode: 'wrap',
--- 57367,57373 ----
/**
* @cfg {String} defaultValue A default value to be put into the editor to resolve focus issues (defaults to ? (Zero-width space), (Non-breaking space) in Opera and IE6).
*/
! defaultValue: ' ',
// private properties
actionMode: 'wrap',
-
did you try your suggestion in IE6 / Opera?
there's a reason why there's an explicit check in there for these 2 browsers.
-
Sencha User

Originally Posted by
mystix
did you try your suggestion in IE6 / Opera?
there's a reason why there's an explicit check in there for these 2 browsers.
My patch doesn't change the logic for IE6/Opera.