Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

The dropdown typeahead box is NOT right justified #5414

Open
anasqadrei opened this issue Feb 4, 2016 · 11 comments
Open

The dropdown typeahead box is NOT right justified #5414

anasqadrei opened this issue Feb 4, 2016 · 11 comments

Comments

@anasqadrei
Copy link

My website is in an RTL language. My <body> is right justified <body dir="rtl" class="text-right">, but the typeahead dropdown box is always aligned to the left. I want it to be aligned/justified to the right. Here is a plunker to an example http://plnkr.co/fs79igc1fJWTqY4xrWTt. Type "on" or "one" in the text box.

@icfantv
Copy link
Contributor

icfantv commented Feb 4, 2016

Technically this is a duplicate of #2753 and superseded by #4762, but comments weren't followed up on. Need to decide whether or not to tackle this separately.

@icfantv
Copy link
Contributor

icfantv commented Feb 4, 2016

@RobJacobs, do you have a sense of whether or not this is a simple fix involving a check for RTL and placing the dropdown appropriately?

@RobJacobs
Copy link
Contributor

@icfantv Is this in regards to the text displayed in the dropdown options or the popup not getting right aligned? I've been working on adding the smart positioning to the datepicker and dropdown popup, but that would not cover the text in the options.

@icfantv
Copy link
Contributor

icfantv commented Feb 5, 2016

I'm pretty sure it's just the popup, but since I can't read Arabic I don't know for sure. I'd need to check with an RTL font with which I'm familiar. I'll see if u can check with Hebrew this morning.

@wesleycho
Copy link
Contributor

Couldn't one override the alignment with user CSS?

@evilaliv3
Copy link

@anasqadrei have you managed to solve this somehow?

for sure using https://github.com/MohammadYounes/RTL-bootstrap/tree/inline-rtl would fix some of the issues; but the tooltip.js implemented in angular-ui remains the main problem.

@anasqadrei
Copy link
Author

@evilaliv3 the way I've solved it is by hard coding right alignment in my version of ui-bootstrap. That wasn't a good solution and that's why I'm asking for ui-bootstrap to be alignment aware.

@wesleycho
Copy link
Contributor

Ah, I see what the problem is - this needs to be modified in the $uibPosition service. This likely also requires configuration in the typeahead for this.

@wesleycho wesleycho added this to the Backlog milestone May 23, 2016
@evilaliv3
Copy link

Related to #4762

is some of you aware of any workaround?

@anasqadrei
Copy link
Author

@evilaliv3 My website is in an RTL language (Arabic) so I just hardcoded text align to be right somewhere in ui-bootstrap-custom-tpls.js file

@anasqadrei
Copy link
Author

How do you use position service to align typeahead results to the right? Could someone answer my stackoverflow question please?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants