jenkins-bot has submitted this change and it was merged.
Change subject: Post MT: Click has same effect for section pairs
......................................................................
Post MT: Click 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(-)
Approvals:
Divec: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I34b8b1d9fb768a62fbdcaf7694bd4a95deef1b8a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Divec <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits