Nikerabbit has uploaded a new change for review.

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


Change subject: Allow text selection in page mode
......................................................................

Allow text selection in page mode

Bind the click event handler to one level deeper: not the element
which has both the message display and editor, but to the message
display only.

Replaced return false with e.preventDefault to allow clicks to
bubble up and close dialogs for example. This only blocks for
example opening of links rendered in messages. And even those
can still be accessed via the context menu.

Bug: 47861
Change-Id: I941b7a9ed0ba4672b9dc71bb706c225ba5d9c712
---
M resources/js/ext.translate.pagemode.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/72/69972/1

diff --git a/resources/js/ext.translate.pagemode.js 
b/resources/js/ext.translate.pagemode.js
index 2e36020..fb0aac4 100644
--- a/resources/js/ext.translate.pagemode.js
+++ b/resources/js/ext.translate.pagemode.js
@@ -92,9 +92,9 @@
                listen: function () {
                        var pagemode = this;
 
-                       this.$message.on( 'click', function () {
+                       this.$message.children( '.message' ).on( 'click', 
function ( e ) {
                                pagemode.$message.data( 'translateeditor' 
).show();
-                               return false;
+                               e.preventDefault();
                        } );
                }
        };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I941b7a9ed0ba4672b9dc71bb706c225ba5d9c712
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to