Santhosh has uploaded a new change for review.

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

Change subject: Post MT: Clicking has same effect for section pairs
......................................................................

Post MT: Clicking has same effect for section pairs

After MT, clicking on source section has same effect of clicking
on target section. That means, clicking on the source section opens
up the MT tool card just like a translated target section.

Indirectly this fix the following issue:
When a link is highlighted, it is not possible to remove the highlighting
by clicking to the source paragraph regular text.

Change-Id: I34b8b1d9fb768a62fbdcaf7694bd4a95deef1b8a
---
M modules/translation/ext.cx.translation.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index 8b256f8..55240c7 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -147,7 +147,11 @@
 
                // Translation filled up. Unbind click handler for the source 
section.
                $sourceSection.unbind( 'click', sourceSectionClickHandler );
-
+               // And now onwards clicking on source section has same effect 
of clicking
+               // on target section.
+               $sourceSection.on( 'click', function () {
+                       mw.hook( 'mw.cx.translation.focus' ).fire( $section );
+               } );
                // If the section is editable, initiate an editor.
                // Otherwise make it non-editable. Example: templates
                if ( $sourceSection.data( 'editable' ) === false ) {

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

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

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

Reply via email to