material icon indicating copy to clipboard operation
material copied to clipboard

Scroll support for <md-tabs> in RTL languages

Open mosiruane123 opened this issue 10 years ago • 8 comments

Actual Behavior: Scroll arrows are inverted and scrolling on tabs not functioning

  • What is the issue? * Scroll support for in RTL not working
  • What is the expected behavior? Scroll arrows in correct position and supporting scroll on tabs

CodePen (or steps to reproduce the issue): * Change page direction which includes to rtl (dir="rtl")

  • CodePen Demo which shows your issue: http://codepen.io/anon/pen/oLJKNr
  • Details: open up developer tools/ Inspect element (F12) to narrow screen size. Adjust until the tabs are truncated and the next/previous arrows appear Notice the arrows are inverted and the scroll left/right no longer works Is there a fix for this issue?

Angular Versions: *

  • Angular Version: v1.5.0
  • Angular Material Version: v1.1.0-rc4

Additional Information:

  • Browser Type: * Chrome
  • Browser Version: *52.0.2743.82 m
  • OS: * Windows
  • Stack Traces: ---

Shortcut to create a new CodePen Demo. Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions. Add more lines if needed.

mosiruane123 avatar Aug 12 '16 09:08 mosiruane123

Let me look into this a bit. In theory, this should be a simple fix, but I have not dealt with the RTL code in tabs before so I'm not sure exactly how it works.

topherfangio avatar Aug 12 '16 21:08 topherfangio

Ah brilliant! Great stuff, that solved the issue. All working now.

mosiruane123 avatar Aug 15 '16 08:08 mosiruane123

Please add an code example that you use with rtl support that i can use it too. Thanks

Avishaidev avatar Dec 20 '16 07:12 Avishaidev

@Avishaidev

I just made the new changes to the files found in topherfangio's commit. https://github.com/profoundry-us/material/commit/e9c91c48e866aee356ef3771e95b4e69deec47a8

tabs.scss and tabsController.js

I just wanted to confirm that it was working, which it was. I reverted the changes on my own files as I will wait until the official build containing the fix is released.

Thanks, Mossy

mosiruane123 avatar Dec 22 '16 12:12 mosiruane123

@mosiruane123

Thanks for your replay. I already change my angular-matrial.js file in my project to support rtl. thanks any way

Avishaidev avatar Dec 22 '16 12:12 Avishaidev

This issue is really important to me but it doesn't get fixed, is there any ETA on it to work?

The next\prev buttons aren't working well and the swipes are to the wrong sides.

Is it worthwhile making a PR for it? will it be considered?

NaNgets avatar Feb 21 '17 23:02 NaNgets

This is a working codepen demo for this issue: http://codepen.io/djidel/pen/NpMpmY Are there any workarounds?

djidel avatar Mar 22 '17 23:03 djidel

11 i have tried code of @topherfangio . embed that in my application, updated tabs.scss & tabController.js but still im having the same issue that in RTL, tabs are disabled and not working. my angular-material library version is 1.1.4 Kindly help me in this issue at earliest. @Avishaidev what changes you have done in your library to support RTL ?

areeb5 avatar Nov 16 '17 13:11 areeb5