When you edit a context and select a condition plugin it opens an edit form on the right side.

If you click anywhere on the page, it closes the edit form and you have to reopen it by clicking on the condition plugin on the left side. This only happens in IE7 & IE8.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

barthje’s picture

Status: Active » Needs review
FileSize
762 bytes

The problem lies in this function in context_ui.js:

// Select handler.
  $('.context-plugin-selector select', this.form).change(function() {
    var plugins = $(this).parents('div.context-plugins').data('contextPlugins');
    if (plugins) {
      var plugin = $(this).val();
      plugins.addPlugin(plugin);
    }
  });

It's being fired when this happens: $('.context-plugin-selector select', this.form).val(0);

I don't think the change event should do anything if the value is 0. My proposed solution is the following:

// Select handler.
  $('.context-plugin-selector select', this.form).change(function() {
    // Only do this if a plugin is actually selected.
    if (this.value != 0) {
     var plugins = $(this).parents('div.context-plugins').data('contextPlugins');
     if (plugins) {
       var plugin = $(this).val();
       plugins.addPlugin(plugin);
     }
    }
  });

A patch is included.

tekante’s picture

I'm not able to replicate the described behavior but can you see if the following patch works (it just leverages where the value was already being fetched to and wraps the not zero check around the addPlugin call.

barthje’s picture

I'll test it out tomorrow and will let you know the results!

hass’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Since IE7 and IE8 is EOL we do not fix issues any longer for dead browsers. Closing.

barthje’s picture

Sorry for the delay, the results were good!