ve.init.mw.DesktopArticleTarget: Remove hack for reversed tabs in RTL in Vector

Vector no longer does the silly thing where the tabs are reversed in
the HTML in RTL languages, so we must remove our hack to do the same,
since otherwise it reintroduces the issue it was intended to prevent.

This essentially reverts 2efd4f0061.

Bug: T50017
Change-Id: Ibeaa55bc34899bffab849ea8ad8b127fb5184d43
This commit is contained in:
Bartosz Dziewoński 2017-09-28 07:34:33 +02:00
parent 4067b05832
commit a0f934ed26

View file

@ -426,10 +426,8 @@
$caVeEdit = $( '#ca-ve-edit' ),
$caEditLink = $caEdit.find( 'a' ),
$caVeEditLink = $caVeEdit.find( 'a' ),
reverseTabOrder = $( 'body' ).hasClass( 'rtl' ) && pTabsId === 'p-views',
caVeEditNextnode =
// eslint-disable-next-line no-bitwise
( reverseTabOrder ^ conf.tabPosition === 'before' ) ?
( conf.tabPosition === 'before' ) ?
$caEdit.get( 0 ) :
$caEdit.next().get( 0 );
@ -468,8 +466,7 @@
}
} else if ( $caEdit.length && $caVeEdit.length ) {
// Make the state of the page consistent with the config if needed
// eslint-disable-next-line no-bitwise
if ( reverseTabOrder ^ conf.tabPosition === 'before' ) {
if ( conf.tabPosition === 'before' ) {
if ( $caEdit[ 0 ].nextSibling === $caVeEdit[ 0 ] ) {
$caVeEdit.after( $caEdit );
}