Skip to content

Reposition the dropdown div on a resize to fix issues with Android #169

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

Merged
merged 4 commits into from
Nov 14, 2018

Conversation

samelhusseini
Copy link
Contributor

#158 recently was a similar fix that repositioned the WidgetDiv when a resize occurred rather than closing it, which fixed issues with editing text fields on Android when the keyboard popped up.

This PR adds a similar fix but for the Dropdown div so you're able to use the textdropdown field and other similar fields that focus on a text field which in turn pops up the keyboard.

I'm also trying to standardize the ways we show the dropdowndiv into two methods:

  • showPositionedByBlock (Already exists) which positions the dropdown div around the block bounds
  • showPositionedByField (New) which positions the dropdown div around the field. Which is currently only used by field_dropdown and field_number's numPad.

Field's should no longer directly call the dropdown.show method, and we should consider making it private at a later stage.

@rachel-fenichel @picklesrus FYI.

* by a particular field. The primary position will be below the field,
* and the secondary position above the field. Drop-down will be
* constrained to the block's workspace.
* @param {Object} owner The object showing the drop-down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing to field for clarity.

@samelhusseini samelhusseini merged commit 8ee3d79 into develop Nov 14, 2018
@samelhusseini samelhusseini deleted the androidresizedropdown branch November 14, 2018 03:41
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

Successfully merging this pull request may close these issues.

2 participants