Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/244598

Change subject: Get the correct topic DOM object when creating EditPostWidget
......................................................................

Get the correct topic DOM object when creating EditPostWidget

The correct topic dom object is not the post parent, but a
grandparent. This commit fixes that faux-pas.

Change-Id: Iec3712891a91007fa850be2a648729a3730f7d11
---
M modules/flow-initialize.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/98/244598/1

diff --git a/modules/flow-initialize.js b/modules/flow-initialize.js
index e28a0c0..f009606 100644
--- a/modules/flow-initialize.js
+++ b/modules/flow-initialize.js
@@ -247,7 +247,7 @@
                function replaceNoJSEditor( $element ) {
                        var editPostWidget,
                                $post = $element.parent(),
-                               $topic = $post.parent();
+                               $topic = $post.closest( '.flow-topic' );
 
                        if ( !$element.length ) {
                                return;

-- 
To view, visit https://gerrit.wikimedia.org/r/244598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec3712891a91007fa850be2a648729a3730f7d11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to