following #561858: [Tests added] Fix drupal_add_js() and drupal_add_css() to work for AJAX requests too by adding lazy-load to AJAX framework

There is an issue with lazy loading #attached library for IE (7-9).
I've attached an example module, which is a strip down from the user-modal (currently in my sandbox).

Enable and try on chrome/ firefox -- tabs are ok.
Try on IE -- it fails.

Then you can uncomment the following lines:

function user_modal_init() {
  // FIXME: IE bug, library isn't loaded.
  // Uncomment the following link to see it working.
  // drupal_add_library('system', 'ui.tabs');

Refresh and it will of course work.

CommentFileSizeAuthor
user_modal.tar_.gz1.56 KBamitaibu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Status: Active » Closed (duplicate)

I sense this is a duplicate of #1071818: Lazy-loading CSS fails in IE.

amitaibu’s picture

@Damz,

I'm not sure if it's the same, as there it's about CSS, and here it's about JS (in the example module it's jquery UI tabs).

sun’s picture

Version: 7.x-dev » 8.x-dev
Status: Closed (duplicate) » Active

Indeed, given the detailed analysis in #1071818: Lazy-loading CSS fails in IE, that issue should focus on the CSS @import problem with IE only.

JeremyFrench’s picture

I still have a feeling this is related to the CSS issue. Adding a library just calls drupal_add_js() and drupal_add_css(). In the case of the ui.tabs it will load jquery.ui.tabs.css (ad possibly jquery.ui.css). So if #1071818: Lazy-loading CSS fails in IE is not fixed then this will never work.

There is a patch for #1071818 now. If you would like to test it for this as well we can mark as duplicate.

nod_’s picture

updated patch for IE #1071818: Lazy-loading CSS fails in IE, please test.

nod_’s picture

Status: Active » Postponed (maintainer needs more info)

Need testing

nod_’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (fixed)