PDA

View Full Version : [CLOSED][3.0.0] Here is a fix to "this.dom.tagName"



superdave
7 Aug 2009, 1:09 PM
I had to make the following change to eliminate an error in my environment. Perhaps this change will benefit rest of the community. Just look for "this.dom.tagName" in ext-all.js/ext-all-debug.js.

isBorderBox : function(){
- return noBoxAdjust[(this.dom.tagName || "").toLowerCase()] || Ext.isBorderBox;
+ return noBoxAdjust[(this.dom.tagName.toString() || "").toLowerCase()] || Ext.isBorderBox;
},

tryanDLS
7 Aug 2009, 1:44 PM
Please read before posting in Bugs. http://extjs.com/forum/showthread.php?p=341947

What problem does call toString on a string solve?

superdave
7 Aug 2009, 2:21 PM
Thanks for the instructions. Hope this information helps.

Ext version tested:

Ext 3.0.0



Adapter used:

ext


css used:

only default ext-all.css

custom css (include details): I have custom css in my environment. I believe it should not have an impact on this specific issue/solution.




Browser versions tested against:

IE8 (The issue happens on this browser)

FF3 (Tested and no problem here)
Safari 4 (Tested and no problem here)



Operating System:

Mac (for FF and Safari)

Vista (for IE 8)



Description:

This issue happens when click on one of the tabs that contains a form. The actual trigger was unidentified. The browser would break at the line in the code where I proposed code change and the browser complained that there was no such method. A closer look at "this.dom.tagName" reveals that tagName is an object, not a String type. So, the error made sense when calling toLowerCase() on tagName object when tagName isn't a String type. The original author of this code assumed that tagName is a String type in all browsers. Another look at tagName object shows that it has .toString() method. So, I just added a call to the function to resolve the issue.



Test Case:



At this time, I don't have a test case yet.


See this URL : No url available Steps to reproduce the problem:

No steps yet


The result that was expected:

Handle function call correctly


The result that occurs instead:

No function defined


Screenshot or Video:

No screenshot or video



Debugging already done:

Yes. Please see suggested code change in my prior post



Possible fix:

See suggested code fix

mjlecomte
7 Aug 2009, 2:40 PM
How did you cut/paste the bug forum template to get it to show up like that? Perhaps you need to paste the template to an ASCII editor or something so the post is in correct form?

superdave
7 Aug 2009, 3:23 PM
All I did was select the template text, copy and past it into the vB_Editor. I am not sure what I may have missed. Another bug? ;)

mjlecomte
7 Aug 2009, 5:20 PM
Seems like 1 in 8 will somehow copy that text and grab it literally, copying all of the colors etc. If you edit your post you'll see it's formatted with all the colors, etc.

When you open your old post to edit you should only see what that template displayed. I'd appreciate it if you tried again, taking note of any differences if you figure it out. It does happen ... not sure why though.

superdave
12 Aug 2009, 9:49 AM
Here is my second attempt to copy-and-past. Hope this helps.

Ext version tested:

* Ext 3.0.0


Adapter used:

* ext


css used:

* only default ext-all.css
*
custom css (include details): I have custom css in my environment. I believe it should not have an impact on this specific issue/solution.




Browser versions tested against:

* IE8 (The issue happens on this browser)
* FF3 (Tested and no problem here)
Safari 4 (Tested and no problem here)


Operating System:

* Mac (for FF and Safari)
* Vista (for IE 8)


Description:

* This issue happens when click on one of the tabs that contains a form. The actual trigger was unidentified. The browser would break at the line in the code where I proposed code change and the browser complained that there was no such method. A closer look at "this.dom.tagName" reveals that tagName is an object, not a String type. So, the error made sense when calling toLowerCase() on tagName object when tagName isn't a String type. The original author of this code assumed that tagName is a String type in all browsers. Another look at tagName object shows that it has .toString() method. So, I just added a call to the function to resolve the issue.


Test Case:



At this time, I don't have a test case yet.


See this URL : No url available Steps to reproduce the problem:

* No steps yet


The result that was expected:

* Handle function call correctly


The result that occurs instead:

* No function defined


Screenshot or Video:

* No screenshot or video


Debugging already done:

* Yes. Please see suggested code change in my prior post


Possible fix:

* See suggested code fix

evant
12 Aug 2009, 5:47 PM
As you might imagine, it's very difficult to fix a bug that we can't reproduce. For the meantime we'll leave this as INFOREQ, hopefully you can come up with a test case.

mjlecomte
29 Aug 2009, 5:34 AM
There has been no update to this thread in some time, updating status of this thread to CLOSED. Please post information requested to reopen.