Comments

bkosborne’s picture

Status: Active » Needs review
StatusFileSize
new466 bytes
anon’s picture

I think we shall use the event.preventDefault() instead, what you think about that?

bkosborne’s picture

Yes, we should, but an event is not always passed into to that function, so there's no event object to call that on sometimes.

jay.dansand’s picture

We really should never return false; if we can avoid it (see this nice write up of why: jQuery Events: Stop (Mis)Using Return False).

How about instead of always return false;, we add "e" as a function parameter, test for it, and try e.preventDefault() first?

anon’s picture

Like I said in #2.

  • Commit 3700b06 on 7.x-3.x by anon:
    Fixed #2213203 - Closing modal dialog scrolls user to top of page.
    
anon’s picture

Status: Needs review » Fixed

The Drupal.linkit.modalClose method will always receive an event argument.

jay.dansand’s picture

Status: Fixed » Needs work

The event object does not have a preventDefault member in Internet Explorer prior to version 9, so I'd recommend using the original patch from #4 (test for e.preventDefault before calling it).

Also, and just an aside, it's normally desirable to mention issue participants in the commit message (Commit messages - providing history and credit), and give attribution to the patch author (Adding a commit author).

  • Commit 3c23b2e on 7.x-3.x authored by jay.dansand, committed by anon:
    Fixed #2213203 by bkosborne, jay.dansand, anon - Closing modal dialog...
anon’s picture

Status: Needs work » Fixed

Thanks, I didn't know that about preventDefault in the old IE versions, and you are right about the cred, I apologize for that.

jay.dansand’s picture

Thanks! And, in case you don't hear this enough, thanks for this module! It does a great service; I know that module maintenance can be quite time-consuming and burdensome, but we, the community of users, are very grateful!

Status: Fixed » Closed (fixed)

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

The last submitted patch, 1: cancel_causes_page_jump-2213203.patch, failed testing.

Status: Closed (fixed) » Needs work
anon’s picture

Status: Needs work » Closed (fixed)

Closing again, the test bot change the status for some reason.