Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    4
    Vote Rating
    0
    willeraser is on a distinguished road

      0  

    Exclamation htmleditor + fontsize + google chrome

    htmleditor + fontsize + google chrome


    Hi,

    It seems that using the font-size option in the htmleditor interface bugs with google chrome (v9.0.597.98) while it works with firefox.
    When you try to use the source editor option to manually increase the font size then you try to increase it again with the icon, it reduces the font size to default size. Weird...

  2. #2
    Sencha User
    Join Date
    Feb 2008
    Posts
    6
    Vote Rating
    0
    japanick is on a distinguished road

      0  

    Default


    Our team noticed the same thing with new versions of Safari (5.1) and Chrome (15).

    After looking at the Ext source code, it looks like webkit browsers used to return the font size in pixels but now it returns the font size in a number 1 through 7 like the other browsers. The special case code for Safari and Chrome needed to be removed and then it works great!

    Old code:
    Code:
    adjustFont: function(btn){
            var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1,
                doc = this.getDoc(),
                v = parseInt(doc.queryCommandValue('FontSize') || 2, 10);
            if((Ext.isSafari && !Ext.isSafari2) || Ext.isChrome || Ext.isAir){
                
                
                if(v <= 10){
                    v = 1 + adjust;
                }else if(v <= 13){
                    v = 2 + adjust;
                }else if(v <= 16){
                    v = 3 + adjust;
                }else if(v <= 18){
                    v = 4 + adjust;
                }else if(v <= 24){
                    v = 5 + adjust;
                }else {
                    v = 6 + adjust;
                }
                v = v.constrain(1, 6);
            }else{
                if(Ext.isSafari){ 
                    adjust *= 2;
                }
                v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0);
            }
            this.execCmd('FontSize', v);
        },
    New code:
    Code:
    adjustFont: function(btn){
            var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1,
                doc = this.getDoc(),
                v = parseInt(doc.queryCommandValue('FontSize') || 2, 10);
            if(Ext.isAir){
                if(v <= 10){
                    v = 1 + adjust;
                }else if(v <= 13){
                    v = 2 + adjust;
                }else if(v <= 16){
                    v = 3 + adjust;
                }else if(v <= 18){
                    v = 4 + adjust;
                }else if(v <= 24){
                    v = 5 + adjust;
                }else {
                    v = 6 + adjust;
                }
                v = v.constrain(1, 6);
            }else{
                v = Math.max(1, v+adjust);
            }
            this.execCmd('FontSize', v);
        },
    We left the Ext.isAir case because we were not sure if it would still need the special case or not, and we did not test Air clients. If you want to remove the air case as well the code gets much simper:
    Code:
    adjustFont: function(btn){
            var adjust = btn.getItemId() == 'increasefontsize' ? 1 : -1,
                doc = this.getDoc(),
                v = parseInt(doc.queryCommandValue('FontSize') || 2, 10);
                v = Math.max(1, v+adjust);
            this.execCmd('FontSize', v);
        },

Similar Threads

  1. Replies: 5
    Last Post: 6 Jun 2013, 9:53 PM
  2. Google Chrome OS
    By TopKatz in forum Community Discussion
    Replies: 5
    Last Post: 28 Nov 2009, 9:15 AM
  3. Ext is not defined in Google Chrome
    By dbassett74 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 15 Jul 2009, 12:55 PM
  4. Google Chrome
    By evant in forum Community Discussion
    Replies: 38
    Last Post: 3 Sep 2008, 5:15 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar