PDA

View Full Version : [FIXED-242][3.0.0] HtmlEditor line break error on Webkit



wiznia
4 Aug 2009, 9:28 AM
Hi, I found this bug in the HtmlEditor on Webkit. The line breaks, instead of being <br> like in IE or Gecko, are inserted as <div><br></div> when no data is written or as <div>text in second line</div>.
I think the html generated should be the same for all browsers, so here's a fix for it:


if(Ext.isWebKit) {
Ext.override(Ext.form.HtmlEditor, {
fixKeys: function(e) {
var k = e.getKey();
if(k == e.TAB){
e.stopEvent();
this.execCmd('InsertText','\t');
this.deferFocus();
} else if(k == e.ENTER) {
e.stopEvent();
this.execCmd('InsertHtml','<br /><br />');
this.deferFocus();
}
}
});
}

wiznia
12 Aug 2009, 2:01 AM
Anyone? Is this considered a bug? Is this the desired behaviour?

evant
10 Sep 2009, 10:27 PM
Fix applied to svn in rev #5335 for patch release 3.0.2.

wiznia
11 Sep 2009, 12:58 AM
Thanks!