dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a7da4f
)
LivePreview: bind a delegated click event for #wpPreview/Diff
author
Andrew Garrett
<agarrett@wikimedia.org>
Sat, 15 Sep 2012 14:14:27 +0000
(16:14 +0200)
committer
MatmaRex
<matma.rex@gmail.com>
Sun, 16 Sep 2012 12:35:40 +0000
(14:35 +0200)
This makes it work with edit forms added to the page after it is loaded,
e.g. by an extension (like LiquidThreads).
Change-Id: Ia9673a754c871baea82bb28ded7b19e2608d9d03
skins/common/preview.js
patch
|
blob
|
history
diff --git
a/skins/common/preview.js
b/skins/common/preview.js
index
c88272d
..
5b5a3c6
100644
(file)
--- a/
skins/common/preview.js
+++ b/
skins/common/preview.js
@@
-101,6
+101,6
@@
// (mw.loader takes care of stuff if they happen to be loaded already)
mw.loader.load( 'mediawiki.action.history.diff' );
- $(
'#wpPreview, #wpDiff' ).click(
doLivePreview );
+ $(
document.body ).on( 'click', '#wpPreview, #wpDiff',
doLivePreview );
} );
} )( mediaWiki, jQuery );