Results 1 to 4 of 4

Thread: [FIXED-242][3.0.0] HtmlEditor line break error on Webkit

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2008
    Posts
    157

    Default [FIXED-242][3.0.0] HtmlEditor line break error on Webkit

    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:
    Code:
    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();
                }
            }
        });
    }

  2. #2
    Sencha User
    Join Date
    Jun 2008
    Posts
    157

    Default

    Anyone? Is this considered a bug? Is this the desired behaviour?

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    Fix applied to svn in rev #5335 for patch release 3.0.2.
    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.

  4. #4
    Sencha User
    Join Date
    Jun 2008
    Posts
    157

    Default

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •