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

Incorrect Selection seen on long press in ios webview on chart #609

Closed
jalpesh opened this issue Oct 31, 2020 · 5 comments · Fixed by #612
Closed

Incorrect Selection seen on long press in ios webview on chart #609

jalpesh opened this issue Oct 31, 2020 · 5 comments · Fixed by #612
Assignees
Labels
bug Unexpected problem or unintended behavior.
Milestone

Comments

@jalpesh
Copy link

jalpesh commented Oct 31, 2020

Image from iOS

On long press I get this odd blue selection seen in ios webview, any solutions for this?

@timocov
Copy link
Contributor

timocov commented Nov 2, 2020

Can you provide a repro for that? I thought we've disabled this in

function disableSelection(canvas: HTMLCanvasElement): void {
canvas.style.userSelect = 'none';
// eslint-disable-next-line deprecation/deprecation
canvas.style.webkitUserSelect = 'none';
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access
(canvas as any).style.msUserSelect = 'none';
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-member-access
(canvas as any).style.MozUserSelect = 'none';
canvas.style.webkitTapHighlightColor = 'transparent';
}
, maybe you have overridden this props in your code?

@jalpesh
Copy link
Author

jalpesh commented Nov 2, 2020

No have not overridden the above. I added the below CSS in my code to fix the issue.

<style type="text/css"> *:not(input):not(textarea) { -webkit-user-select: none; /* disable selection/Copy of UIWebView */ -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */ } </style>

It is only happening in ios in app webview when embedded from flutter and not in any other situation.

@timocov
Copy link
Contributor

timocov commented Nov 5, 2020

It is only happening in ios in app webview when embedded from flutter and not in any other situation.

So if you use it in just webview without flutter it works? Can you create a repro for that please? Did you try to add the library by using https://github.com/tradingview/LightweightChartsIOS, does it have the same issue?

@jalpesh
Copy link
Author

jalpesh commented Nov 5, 2020

Yes I did add the lib, got the same issue. Will need to check in webview without flutter will ping here once I try to rep in that. For now I think we can close this issue since it is solved by adding the above mentioned css for me.

@timocov
Copy link
Contributor

timocov commented Nov 12, 2020

I'm able to reproduce it in just webview. Safari is new IE 💩 ...

We'll fix it.

@timocov timocov added this to the 3.2 milestone Nov 12, 2020
@timocov timocov added the bug Unexpected problem or unintended behavior. label Nov 12, 2020
@timocov timocov self-assigned this Nov 12, 2020
timocov added a commit that referenced this issue Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants