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

Adjust .chosen-dropup class based on viewport scroll position #27

Open
JJJ opened this issue Jul 23, 2020 · 0 comments
Open

Adjust .chosen-dropup class based on viewport scroll position #27

JJJ opened this issue Jul 23, 2020 · 0 comments
Assignees

Comments

@JJJ
Copy link
Owner

JJJ commented Jul 23, 2020

harvesthq#2036 added screen edge detection, allowing for the drop down to drop up when necessary. Once open however, it is always either up or down, and does not react to a change in viewport scroll position.

This enables the awkward user experience depicted below:

jjj-sc-2020-07-23 at 12 41 06@2x

As you can see, the drop down can be scrolled upwards beyond where it is visible. It can similarly be done dropped down by default, and will not drop up when space allows.

jjj-sc-2020-07-23 at 12 45 57@2x

Steps to reproduce

  1. Open a Chosen drop down
  2. Scroll the page out of bounds
  3. Notice it does not adapt to fit the viewport

Expected behavior

The drop down should adjust itself, either up or down.

Actual behavior

The drop down retains the state from which it was first made visible.

Environment

  • Chosen Version: 2.0.0
  • jQuery or Prototype Version: any
  • Browser and Version: any
  • OS and Version: any
@JJJ JJJ self-assigned this Jul 23, 2020
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