Project

General

Profile

Actions

Bug #3621

closed

CB Menu displayed as menu bar in IE causes JS error

Added by krileon almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
01 August 2012
Due date:
% Done:

100%

Estimated time:
2:00 h

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

3621.patch (688 Bytes) 3621.patch krileon, 01 August 2012 18:26
Actions #1

Updated by krileon almost 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.

Actions #2

Updated by krileon almost 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.

Actions #3

Updated by krileon almost 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.

Actions #4

Updated by beat over 11 years ago

  • Priority changed from Normal to High
Actions #5

Updated by beat over 11 years ago

  • Status changed from Resolved to Closed
  • Estimated time set to 2:00 h

Fixed as suggested in r1877 .
Thank you Kyle.

Actions

Also available in: Atom PDF