Looks like #1395102: Page scrolls to top when user clicks Cancel button was never put in 3.x branch. Patch coming.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | linkit-closing_modal_dialog_scrolls_user_to_top_of_page-2213203-4.patch | 590 bytes | jay.dansand |
| #4 | interdiff-2213203-1-4.txt | 737 bytes | jay.dansand |
| #1 | cancel_causes_page_jump-2213203.patch | 466 bytes | bkosborne |
Comments
Comment #1
bkosborneComment #2
anonI think we shall use the
event.preventDefault()instead, what you think about that?Comment #3
bkosborneYes, we should, but an event is not always passed into to that function, so there's no event object to call that on sometimes.
Comment #4
jay.dansand commentedWe 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 trye.preventDefault()first?Comment #5
anonLike I said in #2.
Comment #7
anonThe
Drupal.linkit.modalClosemethod will always receive an event argument.Comment #8
jay.dansand commentedThe 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.preventDefaultbefore 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).
Comment #10
anonThanks, I didn't know that about
preventDefaultin the old IE versions, and you are right about the cred, I apologize for that.Comment #11
jay.dansand commentedThanks! 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!
Comment #15
anonClosing again, the test bot change the status for some reason.