https://bugzilla.wikimedia.org/show_bug.cgi?id=33566

Krinkle <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|https://bugzilla.wikimedia. |
                   |org/show_bug.cgi?id=33497   |
        Web browser|Internet Explorer 8.x       |---

--- Comment #2 from Krinkle <[email protected]> 2012-01-14 04:19:11 UTC ---
Agreed that this logic is in jQuery and we should use it. However I don't think
it's causing any problems right now. Let's look at the snippet in question:


        context.fallbackWindowOnBeforeUnload = window.onbeforeunload;
        window.onbeforeunload = function() {
            context.$textarea.val( context.$textarea.textSelection(
'getContents' ) );
            if ( context.fallbackWindowOnBeforeUnload ) {
                return context.fallbackWindowOnBeforeUnload();
            }
        };

It preserves the previous value, including support for multiple levels. If this
is broken, it's not because of WikiEditor, since it doesn't overwrite itself.
If this handler isn't called, it's because another script removes it, not the
other way around.

Ironically, it's actually $(window).bind that overwrites any pre-existing on-*
handler. The normal event queue doesn't work cross-browser (in that jQuery
can't use window.addEventListener internally) so it keeps its own load queue
and in that jQuery boldly overwrites any existing handler.

Solution is the same though, as long as everything uses jQuery the queue will
stay in tact.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to