Open znjameswu opened 3 years ago
I think it's better to drop the idea of using "native" context menu on web. MathQuill
failed achieve it either. In fact, no web implementations did this with a native context menu. They all intercept the right click event and override with their custom context menu. Current Flutter can't do that easily.
Also, desktop web can still copy by ctrl+C in the future.
Once https://github.com/flutter/flutter/issues/31955 is resolved, native context menu on web will be dropped and replaced with a custom one. Currently they are still useful for web demos.
Currently
SelectableMath
employed a hack to get righ-click context menu on desktop web, as discussed in https://github.com/znjameswu/flutter_math/issues/10#issuecomment-714297030. However this has an unexpected side effect, because it breaks mobile browsers's selection toolbar.On mobile web, the position of selection toolbar depends on the actual position of the underlying
textarea
(doesn't matter if Flutter Web clips it or not). If we make thetextarea
riduculously large, then the selection toolbar will fly outside the viewport in most cases.