Results 1 to 2 of 2

Thread: glyphFontFamily is not respected by Ext.button.Button, Ext.panel.Title,

    You found a bug! We've classified it as EXTJS-21119 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Saint-Petersburg, Russia

    Default glyphFontFamily is not respected by Ext.button.Button, Ext.panel.Title,

    Ext version tested:
    • Ext 6.0.2

    Browser versions tested against:
    • Chrome

    • A global glyphFontFamily setting is not respected by Ext.button.Button, Ext.panel.Title, (at least) if a glyph setting is a string. The fiddle reproduces the case with a Button, but the same behavior is going to be reproducible with Ext.panel.Title and, because there is the similar code that causes the problem.

      Let's look at Ext.button.Button's getTemplateArgs code:

      getTemplateArgs: function () {
          var me = this,
              btnCls = me._btnCls,
              baseIconCls = me._baseIconCls,
              iconAlign = me.getIconAlign(),
              glyph = me.glyph,
              glyphFontFamily = Ext._glyphFontFamily,
              text = me.text,
              hasIcon = me._hasIcon(),
              hasIconCls = me._hasIconCls,
          if (typeof glyph === 'string') {
              glyphParts = glyph.split('@');
              glyph = glyphParts[0];
              glyphFontFamily = glyphParts[1];
          return {
    • You can see that glyphFontFamily is just overridden by glyphParts[1], but it might be undefined if a glyph setting doesn't have a font family and a global font family is meant to be used.
    • Reviewing other components I found that besides Ext.button.Button, a few other components - Ext.panel.Title and have the same problem. But, for example, Ext.Img handles it correctly:
      glyphFontFamily = glyphParts[1] || glyphFontFamily
      which is actually a solution for problematic components as well.

    Steps to reproduce the problem:

    The result that was expected:
    • Both the glyph icons are rendered correctly

    The result that occurs instead:
    • The second button's glyph icon is not rendered correctly
    Frameworks and Tools for .NET Developers
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter

  2. #2


    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. Menu item as plupload button
    By Zdeno in forum Ext 5: Q&A
    Replies: 4
    Last Post: 6 Nov 2017, 5:09 AM
  2. [CLOSED] hideMode: 'visibility' not respected, button keep moving
    By SebTardif in forum Ext 5: Bugs
    Replies: 3
    Last Post: 13 May 2015, 8:16 PM
  3. [FIXED] Button Menu: First menu item does not expand sub menu
    By lmastrodicasa in forum Ext 5: Bugs
    Replies: 1
    Last Post: 26 Nov 2014, 9:52 AM
  4. how set a initial/default item in menu button?
    By jrissone in forum Ext: Q&A
    Replies: 1
    Last Post: 28 Apr 2014, 11:18 AM
  5. Retain menu button after item click
    By AgentSmith in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 30 Oct 2009, 5:32 AM

Posting Permissions

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