Mooeypoo has uploaded a new change for review.

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


Change subject: Fix for edit links, RTL wikis with LTR interface
......................................................................

Fix for edit links, RTL wikis with LTR interface

Added both bidi-isolation and directionality. Since the directionality
has to come from the user interface (and not the wiki dir itself) I had
to read the $('body') direction. The other option could be adding a
mw.config.get().userLanguageDir that picks up the interface directionality
on top of the wiki directionality.

Bug: 50543
Change-Id: I9a00e9545a46f13750ab0d118b23d05573ee1a2e
---
M modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css
M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/68/71568/1

diff --git a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css 
b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css
index 450b15d..f08524e 100644
--- a/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css
+++ b/modules/ve/init/mw/styles/ve.init.mw.ViewPageTarget.css
@@ -327,6 +327,10 @@
 .mw-editsection {
        white-space: nowrap;
        padding-right: 0.25em;
+       /* bidi isolation: */
+       unicode-bidi: -moz-isolate;
+       unicode-bidi: -webkit-isolate;
+       unicode-bidi: isolate;
 }
 
 .mw-editsection-divider {
diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
index deb05fc..f2ce4b0 100644
--- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
@@ -1242,6 +1242,8 @@
                $editsections = $( '#mw-content-text .mw-editsection' ),
                handler = ve.bind( this.onEditSectionLinkClick, this );
 
+       // match direction to the user interface
+       $editsections.css( 'direction', $( 'body' ).css( 'direction' ) );
        // The "visibility" css construct ensures we always occupy the same 
space in the layout.
        // This prevents the heading from changing its wrap when the user 
toggles editSourceLink.
        $editsections.each( function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a00e9545a46f13750ab0d118b23d05573ee1a2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

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

Reply via email to