LiquidThreads is loading this core module when rendering an
inline edit form. Because the form doesn't have the same ID
as the one in core, this broke after
becd284.
It previously worked because the click event on the button (of
which LQT did duplicate the ID from core) bubbles up to the
document body and thus trigger this private handler of the
core edit preview module.
Change-Id: I9e35d0c48b86e1c9073b68313a8a330c6ea85b86
);
}
- $( '#editform' ).on( 'click', '#wpPreview, #wpDiff', doLivePreview );
+ // This should be moved down to '#editform', but is kept on the body for now
+ // because the LiquidThreads extension is re-using this module with only half
+ // the EditPage (doesn't include #editform presumably, bug 55463).
+ $( document.body ).on( 'click', '#wpPreview, #wpDiff', doLivePreview );
} );
}( mediaWiki, jQuery ) );