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 offset and animation issues #823

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

BPerlakiH
Copy link
Collaborator

@BPerlakiH BPerlakiH commented Jun 20, 2024

Fixes: #815
Fixes: #816

It also fixes some other scroll issues.

it was not possible to reveal the bars in certain cases:

no_bars_flicker.mov

it was not possible to get out of a screen (forever flickering):

forever_flicker.mov

@BPerlakiH BPerlakiH requested review from rgaudin and kelson42 June 20, 2024 23:41
@BPerlakiH BPerlakiH linked an issue Jun 20, 2024 that may be closed by this pull request
@BPerlakiH BPerlakiH mentioned this pull request Jun 21, 2024
@kelson42
Copy link
Contributor

@BPerlakiH Thank you for the patch. Could you please explain briefly why the bug? Why only on iPad? How the solution looks like, because all of this is not clear to me.

@BPerlakiH
Copy link
Collaborator Author

Briefly it is connected to the scroll down to hide bars functionality: #771
Which we applied only for iOS, but it meant to be really fully applicable only for iPhones. Whereas the implementation is shared between iPhone and iPads, it had some side effects for iPads, that is now fixed.

The offset of the initial screen appeared, due to this extra call we had:

webView.setValue(true, forKey: "_haveSetObscuredInsets")

which is in collision with hiding / showing the bars.

The other issue was that hiding / showing the bars in itself can cause a scroll event, which in return might toggle the bars again, and we can end up in an endless loop (as on the video).
In short solution to that: the hide / show of the bars is animated. We won't apply showing / hiding the bars until the previous animation is still running.

Another small fix is that, when the bottom bar is displayed, that is taken into consideration for laying out the web-view content (which wasn't the case previously).

Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

LGTM

@kelson42 kelson42 merged commit 7e2ad33 into main Jun 21, 2024
4 checks passed
@kelson42 kelson42 deleted the 815-zim-is-not-vertically-alligned-properly branch June 21, 2024 13:38
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.

Losing capacity to focus in a ZIM ZIM is not vertically alligned properly
3 participants