Bug #3621
closedCB Menu displayed as menu bar in IE causes JS error
Description
When displaying CB Menu on profile as a menu bar it causes the below fatal JS error in IE.
SCRIPT5007: Unable to get value of the property 'style': object is null or undefined
menubest.js?v=b99f7b69b0fe7734, line 183 character 3
https://www.joomlapolis.com/forum/153-professional-member-support/206630-problem-with-cb-and-ie8
Files
Updated by krileon over 12 years ago
This code only executes on window.onresize. This is fine in other browsers, because it only triggers this exactly in that situation. However, IE appears to fire it on first page load even though window wasn't resized. The error happens because the JS that setups the HTML and has the ID it's trying to reach hasn't fired yet resulting in an error.
Updated by krileon over 12 years ago
Further investigation shows that IE fires this when elements on page also resize. For example if "body" resizes it'll fire window.onresize.
Updated by krileon over 12 years ago
- File 3621.patch 3621.patch added
- Status changed from Assigned to Resolved
- Assignee changed from krileon to beat
- % Done changed from 0 to 100
Patch ensures the event is only bound after the page loads. Using alerts confirmed it still fires as normally after load.
Updated by beat about 12 years ago
- Status changed from Resolved to Closed
- Estimated time set to 2:00 h
Fixed as suggested in r1877 .
Thank you Kyle.