Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VerticalOffset of 0 causes VerticalOffset of -4 or 8 #289

Open
ryangreenhill opened this issue Apr 20, 2018 · 0 comments
Open

VerticalOffset of 0 causes VerticalOffset of -4 or 8 #289

ryangreenhill opened this issue Apr 20, 2018 · 0 comments

Comments

@ryangreenhill
Copy link

ryangreenhill commented Apr 20, 2018

Description

Due to the fact that if(0) is false, the following code in paper-dropdown-menu.html does not fire the return of opt_verticalOffset and instead returns 8 or -4.

_computeMenuVerticalOffset: function(noLabelFloat, opt_verticalOffset) {
          // Override offset if it's passed from the user.
          if (opt_verticalOffset) { return opt_verticalOffset; }

          // NOTE(cdata): These numbers are somewhat magical because they are
          // derived from the metrics of elements internal to `paper-input`'s
          // template. The metrics will change depending on whether or not the
          // input has a floating label.
          return noLabelFloat ? -4 : 8;
},

Expected outcome

I expect a verticalOffset of 0.

Actual outcome

I receive a verticalOffset of -4 or 8, depending on the state of noLabelFloat

Steps to reproduce

  1. Put a 'paper-dropdown-menu' in the page. Set the 'verticalOffset' attribute of the 'paper-dropdown-menu' to '0'
  2. Open the page in a web browser
  3. Click the 'paper-dropdown-menu' element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant