When you attach some events on a submit button in a form within a ctools modal, event is not triggered because the form submit is triggered from modal.js.
The previous fix was for jquery 1.4 so we added a test for triggering the previous patch only in a jQuery 1.4 context (the bubbling is fixed in jQuery 1.4.4).

Comments

ilyna’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new654 bytes
artusamak’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Patch (to be ported) » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: eventBubblingBugIE8-1823088-1.patch, failed testing.

mrjmd’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new634 bytes

Re-roll attached.

damienmckenna’s picture

Status: Needs review » Needs work

The comment needs proper wrapping at line 80, and shouldn't the "==" comparison be "===" instead?

mrjmd’s picture

Status: Needs work » Needs review
StatusFileSize
new634 bytes

The comment was only 78 chars long I think, but I went ahead and re-organized it, changed "binded" to "bound", and "==" to "===".

damienmckenna’s picture

Status: Needs review » Needs work

Another small correction, the code should actually be: typeof myVar === "undefined"

mrjmd’s picture

Status: Needs work » Needs review
StatusFileSize
new643 bytes

Yep, I was wondering about that too. Here's another try.

parisek’s picture

Proposed patch resolved issue with editablefields in modal window. Similar issue was reported in https://www.drupal.org/node/2427281

I think patch in #9 is good candidate to be committed soon

njbarrett’s picture

Status: Needs review » Reviewed & tested by the community

Patch #9 fixed the issue for me. This should definitely be commited.
Autosubmits in modals are broken without it.

njbarrett’s picture

Title: JS event bubble error on IE8 with jQuery 1.4.4 » Autosubmit forms in modals are broken
damienmckenna’s picture

japerry’s picture

why did undefined turn into "undefined" ?? or does that matter?

damienmckenna’s picture

@japerry: Because that's how you're supposed to do it: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operat...

damienmckenna’s picture

Moving this to the v7.x-1.10 release plan.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Ahh makes sense. Committed.

  • japerry committed 77ce35d on 7.x-1.x authored by mrjmd
    Issue #1823088 by mrjmd, kynaa: Autosubmit forms in modals are broken
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

othermachines’s picture

Just alerting you all to a possible bug related to this fix: #2787045: Regression: Compatibility with Drupal 7 core version of jQuery broken .

jastraat’s picture