I am Working on a Ionic 1 project which have two language Arabic which is RTL and English which is LTR.
I added two menus to handle this, one with side="right"
for Arabic and the other one with side="left"
for English
Every thing is working fine at start but when I change the language the side menu content is draggable to the left and right !!
It should be draggable only to left only when then left menu is displayed and to right only when the right menu is displayed
Trials
I tried with drag-content='false'
[disable both directions].
I trired to add event Listener on ionic-side-menus-content
on drag to check if direction is left so I could preventDefault
and return false;
[didn’t worked]
here is screenshot of the issue.
Accepted Direction
Wrong behaviour
app.html code
<ion-side-menus enable-menu-with-back-views="false">
<!-- Left menu -->
<ion-side-menu side="left" ng-if="$root.lang=='en'">
<div ng-include="'tpls/side-menu.html'"></div>
</ion-side-menu>
<ion-side-menu side="right" ng-if="$root.lang=='ar'">
<div ng-include="'tpls/side-menu.html'"></div>
</ion-side-menu>
<ion-side-menu-content>
<!-- Main content, usually <ion-nav-view> -->
<ion-nav-bar align-title="center">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-buttons side="{{$root.lang=='ar'?'right':'left'}}">
<button class="button button-icon button-clear ion-navicon" menu-toggle="{{$root.lang=='ar'?'right':'left'}}">
</button>
</ion-nav-buttons>
<div class="bar bar-subheader">
<div class="searchBox primaryColor-bg">
<div class="ionicons">
<i class="ion-camera"></i>
<span>|</span>
<i class="ion-search"></i>
</div>
<input type="text" name="" placeholder="{{'TITLES.SEARCH_PLACEHOLDER'|translate}}" value="">
</div>
</div>
</ion-nav-bar>
<ion-nav-view name="menuContent" >
</ion-nav-view>
</ion-side-menu-content>
</ion-side-menus>
Any help will be appreciated