Describe the bug
Any drawing app scrolls up and down while drawing. Possibly related to https://github.com/duckduckgo/Android/pull/674 makes DDG completely unusable in this matter.
How to Reproduce
Steps to reproduce the behavior:
Expected behavior
Drawing should be able to work on any webpage with drawing canvas capabilities, coordinator layout should stop going up and down while you are drawing, making drawing impossible
Smartphone (please complete the following information):
Thanks for reporting and sharing that website as an example. We knew about websites having bottom-anchored content being affected, but this one is a different and totally valid use case too.
I'm new to contributing to opensource projects. Can I work on this issue?
@kwawmannanjnr definitely, we welcome PRs for any issues tagged with help wanted. Check out our CONTRIBUTING.md guidelines for more information.
Information for possible contributions:
The issue is that the web view can actually off be positioned partially offscreen depending on the scrolling. When you scroll the page, the toolbar slides up, as does the web view. So only when the toolbar is fully up off screen is the web view fully positioned onscreen.
It seems to be a combo of the scroll behaviour + CoordinatorLayout that is causing the issue.
Some websites where this issue is easy to reproduce are:
@cmonfortep if this issue is one that's "different and totally valid use case too" then why did you close #638 ? This issue looks complex and different the one described in that other issue. The complexity of trying to fix the sketchpad app vs bottom navbar / fixed position elements generally is a different issue imo.
Hi @garygreen, by "this one is different" I didn't want to say it's another problem, but a new scenario that we didn't know about. Both issues are affected by the same root cause.
I understand your point here, however, we didn't want to keep both issues open and decided to give this one more visibility during Hacktoberfest. I apologize if that was not clear.
In any case, we also posted this comment, which explains the root cause, and also shares the examples we commented in https://github.com/duckduckgo/Android/issues/638
Tracking this internally: https://app.asana.com/0/0/1187616573788673/f
Are you guys fixing this internally or could I try to tackle this?
Go for it! We are tracking this issue internally, but we haven't had time to work on that yet.
Unfortunately I couldn't understand what's the cause of this issue so I couldn't provide a fix. I'll try another issue to fix.
But while experimenting and trying to understand what's going I saw this behaviour: if in fragment_browser_tab.xml one sets android:fitsSystemWindows="true" on the root CoordinatorLayout and then set android:layout_marginBottom="?attr/actionBarSize" in the ConstraintLayout with id browserLayout everything works properly (sketchpad and Twitter) but the swipe up on the AppBarLayout stops working. Maybe because fitsSystemWindows interferes with the CoordinatorLayout behaviors. I know this is not a fix but maybe is a helpful tip for someone who might fix this.
If it is ok, I would like to work on this issue