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

fix(ion-content): don't adjust padding when focus is given to fixed element #18008

Merged
merged 18 commits into from May 29, 2019

Conversation

Projects
None yet
3 participants
@marpstar
Copy link
Contributor

commented Apr 9, 2019

  • check for fixed containing element and don't adjust ion-content padding.

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix

What is the current behavior?

Issue Number: #18007

What is the new behavior?

  • If the input receiving focus is fixed, do not adjust the padding on ion-content.

Does this introduce a breaking change?

  • No

Other information

Cody Sand

@ionitron-bot ionitron-bot bot added the package: core label Apr 9, 2019

Cody Sand

@marpstar marpstar changed the title Fixes #18007 fix(ion-content): don't adjust padding when focus is given to fixed element Apr 9, 2019

liamdebeasi added some commits Apr 16, 2019

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented May 20, 2019

Thanks for the PR! I updated your code a little bit. ion-searchbar should not be getting this padding in fixed/scrollable contexts, so I added an extra check in there. Otherwise, code looks great!

liamdebeasi added some commits May 21, 2019

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented May 24, 2019

Hey there,

I spoke with the team about this a bit more, and we've decided on a few things:

  1. Ideally we would provide a padding offset for inputs in the fixed slot. If an input was below the halfway point on the screen, it would appear below the keyboard if we did not provide this offset.
  2. Adding padding offsets for inputs in the fixed slot is not working properly anyways, so we'll likely address this in another PR.
  3. The main issue here comes from the fact that ion-searchbar was getting the padding offset when it should not have.

I removed the check for the fixed slot and kept the check for the searchbar. This should fix the issue you are experiencing but leave the door open for us to address other issues with providing the padding offset to inputs in the fixed slot.

Let me know if you have any questions 🙂

liamdebeasi added some commits May 28, 2019

@liamdebeasi liamdebeasi requested a review from brandyscarney May 29, 2019

brandyscarney and others added some commits May 29, 2019

@liamdebeasi liamdebeasi merged commit b2290a6 into ionic-team:master May 29, 2019

1 check passed

build Workflow: build
Details
@liamdebeasi

This comment has been minimized.

Copy link
Member

commented May 29, 2019

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.