PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

Dropdown doesn't render well with RTL direction #183

Open lkovaleva opened 7 years ago

lkovaleva commented 7 years ago

Description

When a paper-dropdown-menu is enclosed in a dir="rtl" element, its floating label is positioned off-center, and the selected element is left-aligned.

Expected outcome

I would expect the label to float to the top-right corner and the selection to be right-aligned.

Actual outcome

The label is somewhere off-center, so it's clearly not just the LTR positioning, but rather neither here nor there. The selection is left-aligned. image

Steps to reproduce

Render this HTML and select an item in the dropdown.

<div dir="rtl">
  <paper-dropdown-menu label="Dinosaurs">
    <paper-menu class="dropdown-content">
      <paper-item>allosaurus</paper-item>
      <paper-item>brontosaurus</paper-item>
      <paper-item>carcharodontosaurus</paper-item>
      <paper-item>diplodocus</paper-item>
    </paper-menu>
  </paper-dropdown-menu>
</div>
bennypowers commented 7 years ago

here's how it looks with some rtl text content.

screen shot 2016-11-15 at 6 00 14 pm

screen shot 2016-11-15 at 6 00 19 pm

DanielTal commented 7 years ago

exactly the same problem

MWalid commented 7 years ago

same here ...