Skip to content

[Feature] Make block handle works on mobile #2114

@ziyak97

Description

@ziyak97

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Affected packages and versions

"@milkdown/crepe": "^7.16.0",     "@milkdown/kit": "^7.16.0",     "@milkdown/react": "^7.16.0"

Link to runnable example

No response

Steps to reproduce

https://stackblitz.com/edit/github-ulgyjpjb?file=components%2FEditor.tsx

Added

      featureConfigs: {
        [Crepe.Feature.BlockEdit]: {
          blockHandle: {
            shouldShow: () => true,
          },
        },
      }

Expected behavior

With shouldShow: () => true configured for the blockHandle, the handle should consistently appear next to the currently active/focused block. Its position should be stable and predictable on both desktop and mobile devices.

Actual behavior

The blockHandle does not always show up next to the active block. It often appears on a previous block, and you need to hover over or interact with other blocks to get it to move to the correct location.
On mobile, this behavior is significantly worse. The handle's placement is very erratic, making it difficult to use for block-level operations.

Runtime

No response

OS

No response

Build and bundle tools

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions