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

On iOS WKWebview, when drawing on top edge of canvas, drawings deleted. #4374

Closed
DeepanshiGupta3 opened this issue Oct 4, 2017 · 3 comments
Labels
stale Issue marked as stale by the stale bot

Comments

@DeepanshiGupta3
Copy link

Version

2.0 beta

We are using free drawing on canvas embedded in WKWebview in iOS app. The canvas container is added to take full space of WKWebview and screen.

Issue: The canvas is displaced by around 10 pixels in its y position. Due to which when drawing on the top edge of canvas, the free drawings are delete (due to multi touch) and there is space of some 10 pixels on lower edge due to which we cannot draw towards the bottom edge of WKWebview.

Even the size of lowecanvas is double the screen size but the size of upper canvas is same as that of screen size. This issue appears only on WKWebview in iOS app. But works fine on browser (Safari or Chrome).

Test Case

testing.zip

Steps to reproduce

Please find attached the source code of app under test case section.

  1. Install and run the app on iPhone device.
  2. App works in landscape left mode.
  3. Try to free draw towards the top edge of screen, touching the top edge. Drawings would be deleted.
  4. Try to draw towards the bottom edge of screen. Canvas is displaced by 10 pixels upwards due to which we cannot draw towards the bottom edge of screen. Even though canvas container covers full screen.

Expected Behavior

We should be able to draw towards the upper edge of screen in free drawing mode without drawings get deleted. And we should be able to draw towards the bottom edge of screen touching the bottom edge without gap of some pixels towards the bottom edge.

Actual Behavior

While drawing towards the top edge of screen in free drawing mode, drawings are deleted and when drawing towards the bottom edge of screen we cannot draw full towards bottom, touching the edge of screen. There is some space due to canvas displacement.

@asturur
Copy link
Member

asturur commented Oct 9, 2017

I have no ability to test on iphones.

@DeepanshiGupta3
Copy link
Author

You can test it on Android phone or iPhone simulator as well.
This issue is occurring on only mobile web views, iPhone and Android and not in browsers.

@stale
Copy link

stale bot commented Jan 26, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jan 26, 2020
@stale stale bot closed this as completed Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue marked as stale by the stale bot
Projects
None yet
Development

No branches or pull requests

2 participants