Results 1 to 3 of 3

Thread: [4.1 B1] CSS.createStyleSheet() error

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-4964 in a recent build.
  1. #1
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Boise, ID
    Vote Rating

    Default [4.1 B1] CSS.createStyleSheet() error

    REQUIRED INFORMATION Ext version tested:
    • Ext 4.1 rev Beta 1

    Browser versions tested against:
    • IE8
    • FF5 (firebug 1.8.3)

    DOCTYPE tested against:
    • strict

    • If a class is defined and then instantiated in an app's viewport with Ext.util.CSS.createStyleSheet() executed either before the app is instantiated or in the custom class definition an error occurs: in Firebug - Ext.util.CSS.getRule("." + Ext.baseCSSPrefix + "form-trigger") is undefined. Tested on intranet web server + remote web server as well as from file system.

    Steps to reproduce the problem:
    • Define a class to be instantiated in the viewport
    • Create an application.
    • In the launch() execute Ext.util.CSS.createStyleSheet('.style{color:red;}','stylesheet_id')
    • Then create a viewport using the class you defined just before in the viewport.

    The result that was expected:
    • Viewport should be created with no errors.

    The result that occurs instead:
    • App creation halts with error: Ext.util.CSS.getRule("." + Ext.baseCSSPrefix + "form-trigger") is undefined

    Test Case:
     Ext.define('Sample.view.Panel', {
                extend: 'Ext.panel.Panel'
                , alias: 'widget.mypanel'
                , title: 'My Panel'
                , dockedItems: [{
                    xtype: 'toolbar'
                    , dock: 'top'
                    , items: [{
                        xtype: 'triggerfield'
                name: 'Sample'
                , appFolder: 'app'
                //, requires: ['Sample.view.Panel']
                , launch: function () {
                    Ext.util.CSS.createStyleSheet('.sample{color:black;}', 'sample-css')
                    var vp = Ext.widget('viewport', {
                        layout: 'border'
                        , items: [{
                            xtype: 'mypanel'
                            , region: 'center'
    HELPFUL INFORMATION Screenshot or Video:
    • n/a

    See this URL for live test case: n/a Debugging already done:
    • none

    Possible fix:
    • not provided

    Additional CSS used:
    • only default ext-all.css

    Operating System:
    • WinXP Pro

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Thank you for the report. This will be included in the next release.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2008
    Phoenix, AZ
    Vote Rating


    Any patch?

Posting Permissions

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