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

在Android上当调用showMenu后并且有选择内容时,菜单定位有问题 #52

Open
aa2013 opened this issue Nov 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@aa2013
Copy link

aa2013 commented Nov 3, 2024

以下均为示例程序中的代码
步骤:

  1. 设置toolbarController
    image

  2. 选择文本,并在ContextMenuControllerImpl中调用showMenu
    此时anchors.primaryAnchor的值为Offset(-10000.0, -10000.0),而anchors.secondaryAnchor此时不为null,为正确的值,样例程序中使用了anchors.primaryAnchor会导致菜单定位到屏幕左上角,如果不选择文本仅长按的话,primaryAnchor为(0,0), secondaryAnchor 为null
    image

  3. 在Android上调用showMenu后,编辑器中选择的文本没有框选背景了,感觉是被抢了焦点?现在我的解决办法是showMenu后延迟一段时间重新对selection进行赋值操作
    image

  4. 还有就是Android上长按不会自动选择点击所在的文本

@aa2013 aa2013 added the bug Something isn't working label Nov 3, 2024
@MegatronKing
Copy link
Member

你好,位置不正确不知道是不是example的问题,我用reqable测试好像没有这个问题。最后一个问题,Android上长按不会自动选择点击所在的文本,这个问题能复现。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants