Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: ExtJs4 + IE8, getting 'invalid argument' error (on call to setStyle)

  1. #11
    Sencha User
    Join Date
    Dec 2011


    OK, FYI, I have tweaked my override such that I do not get the invalid argument error (see code below; not the most efficient, but it works). I'll probably wrap this in a "if (Ext.isIE8) {}" block too because the stock code works fine everywhere else.

    However, now though, still in IE8, when I try to assign the ui config value to the buttons (see my first post in this thread), IE8 shows "[E] Layout run failed" messages.

    Now, on to troubleshoot that error. . .

    Ext.override(Ext.dom.Element, {
    	setStyle: function(prop, value) {
    		var fixBadValue = function(val) {
    			var result = val;
    			var re = new RegExp(/NaNpx/ig);
    			if (val) {
    				if ( {
    					if ( > -1) {
    						result = "inherit";  //not sure if 'inherit' is the proper global fix
    			return result;
    		var _prop = prop;
    		var _value = fixBadValue(value);
    		if (_prop) {
    			for (var name in _prop) {
    				_prop[name] = fixBadValue(_prop[name]);
    		return this.callSuper([_prop, _value]);

  2. #12
    Sencha Premium Member
    Join Date
    Jul 2012


    Thanks for the workaround. I'm going to use it for now.

    I'm seeing this error as well, trying to set a button's UI property. 4.2 project generated with Architect 3.

    BTW, I was also getting "[E] Layout run failed" errors when I was setting the button UI to a UI that didn't exist. So make sure your UI exists -- same spelling, capitalization, etc. I am setting the button UI successfully with the override code that you posted above.

    Thanks for posting it!
    Last edited by patchu; 3 Mar 2014 at 1:06 PM. Reason: elaboration on original message

Page 2 of 2 FirstFirst 12

Posting Permissions

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