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

Open
#52 3 comments 0 reactions 1 assignee View on GitHub

@MegatronKing is already working on this.

Since Nov 3, 2024.

Assessment

This issue has not been assessed yet.

Description

bug

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

  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上长按不会自动选择点击所在的文本

Dominant language
Dart
Stars
761
Forks
102
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reqable/re-editor

All issues in reqable/re-editor

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.