-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: iOS Scroll Assist - Focus on ion-input cloned input moves input up visually #27249
Comments
Thanks for the report. Can you try the following dev build and let me know if it resolves the issue?
|
Hi Liam, thank you for your speedy response. I can report that this does indeed fix the issue! :) Thanks |
Issue number: resolves #27249 --------- <!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The cloned input/textarea for scroll assist is not sized correctly. For legacy inputs, this causes the clone to be off by ~1px because it does not have the correct height. For modern inputs, this causes the same bug as the legacy inputs plus cloned inputs overlap any floating/stacked labels. This was not a concern for legacy inputs because those inputs did not contain the label element where modern inputs do. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Sets `bottom: 0` for cloned inputs so they have the correct height - Sets `position: relative` on the `.native-wrapper` so the cloned input does not flow outside of the parent container. **Before** | Modern Input | Legacy Input | | - | - | | <video src="https://user-images.githubusercontent.com/2721089/233385644-3c15f98e-2646-41e1-b206-34c505791bde.MP4"></video> | <video src="https://user-images.githubusercontent.com/2721089/233385681-8d682222-44b4-4cdc-b0de-96ed3fd38792.MP4"></video> | (Note: The legacy input bug is subtle -- the input only shifts by ~1px) **After** | Modern Input | Legacy Input | | - | - | | <video src="https://user-images.githubusercontent.com/2721089/233385911-243dea95-39b4-4d81-bfe9-26e52382a702.mp4"></video> | <video src="https://user-images.githubusercontent.com/2721089/233386237-2c9eede3-ca91-429b-8a35-15428529a883.mp4"></video> | ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
The issue is when focusing on an input the input seems to visually 'jump' or 'move up'. Looked at the DOM and this looks like it could be related to the 'cloned-input' that gets added on focus.
Using Ionic React version 7 with the latest IonInput syntax for label and label placement.
Running the app on iOS on real devices:
The problem doesn't seem to be an issue on Android.
Video of behaviour:
https://user-images.githubusercontent.com/10227063/233318903-f1919a2d-626f-47c6-aa4c-fbae69c2885d.MP4
Expected Behavior
On input focus the input shouldn't jump / move up.
Steps to Reproduce
Code Reproduction URL
https://github.com/PleoCreative/ion-input-focus-bug
Ionic Info
Ionic:
Ionic CLI : 7.0.1 (/Users/Jacques/.nvm/versions/node/v16.15.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 7.0.3
Capacitor:
Capacitor CLI : 4.7.3
@capacitor/android : not installed
@capacitor/core : 4.7.3
@capacitor/ios : 4.7.3
Utility:
cordova-res : 0.15.4
native-run : 1.7.2
System:
NodeJS : v16.15.0 (/Users/Jacques/.nvm/versions/node/v16.15.0/bin/node)
npm : 9.6.5
OS : macOS Unknown
Additional Information
Found this issue, but not sure if they are related:
#25853
The text was updated successfully, but these errors were encountered: