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.
  1. #1
    Sencha User
    Join Date
    Jul 2008
    Posts
    44
    Vote Rating
    0
    Vaevictus is on a distinguished road

      0  

    Exclamation Ext.util.getRule has different behaviours in different browsers

    Ext.util.getRule has different behaviours in different browsers


    I use a stylesheet containing the following rule which is used to determine what icon to display:

    Code:
    .gridpreviewimage-32-htm, .gridpreviewimage-32-html, .gridpreviewimage-32-asp, .gridpreviewimage-32-aspx, .gridpreviewimage-32-php,  .gridpreviewimage-32-cgi
    {
    background-image:url('../images/Icons/DocumentIcons/32x32/htm.png');
    background-repeat:no-repeat;
    background-position:center;
    }
    In IE, Ext.util.css.getRule(".gridpreviewimage-32-cgi") returns the matched cssrule object, but in chrome it does not. It is because the rule contains multiple selectors separated by commas, when the rule is as follows:

    Code:
    .gridpreviewimage-32-cgi
    {
    background-image:url('../images/Icons/DocumentIcons/32x32/htm.png');
    background-repeat:no-repeat;
    background-position:center;
    }
    both IE and Chrome get a match.

    Because the behaviour is not consistent across browsers I would consider this a bug

    Cheers
    Last edited by Vaevictus; 26 May 2011 at 7:16 AM. Reason: can a mod please edit the title ? thanks