Changes between Version 1 and Version 2 of Ticket #9958, comment 7
- Timestamp:
- Feb 13, 2013, 5:32:38 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9958, comment 7
v1 v2 5 5 var editor = event.editor; 6 6 editor.on('dialogShow', function(dialogShowEvent) { 7 7 8 // When a dialog shows, get its base element and search 8 9 // for all links with void(0) in the href but without an onclick, 9 10 // then replace the href with "###". This prevents IE from triggering 10 11 // onBeforeUnload, and "###" (instead of "#") stops page jumping to top. 12 11 13 $(dialogShowEvent.data._.element.$) 12 14 .find('a[href*="void(0)"]:not([onclick])').each(function(i, e) { 13 15 e.href = "###"; 14 16 }); 17 15 18 }); 16 19 });