Jsahleen has uploaded a new change for review.

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

Change subject: [WIP] Preserve translation selection when clicking source link
......................................................................

[WIP] Preserve translation selection when clicking source link

Change-Id: I6f55a4b91d27bd40b188ab108339fbbce5aa197b
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/94/178594/1

diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 9b14090..697fee2 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -570,6 +570,9 @@
 
                // Capture the current selection
                selection = mw.cx.selection.get();
+               if ( language === mw.cx.sourceLanguage ) {
+                       mw.cx.selection.restore( 'translation' );
+               }
 
                // link can be link text or jQuery link object
                if ( typeof link === 'string' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f55a4b91d27bd40b188ab108339fbbce5aa197b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen <[email protected]>

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

Reply via email to