gutenberg-mobile
gutenberg-mobile copied to clipboard
[Drag & Drop blocks] Drag mode is not enabled when long-pressing over some types of block
trafficstars
Description
The dragging is not working properly when long-pressing over the content of the following types of blocks:
- Search block ✅ (Already addressed in https://github.com/WordPress/gutenberg/pull/41155)
- Contact Info block ❌
- Shortcode block ❌
Looks like this might be related to the fact that these blocks are not using Aztec for rendering the text input, instead, they're using the PlainText component.
- Search block
- https://github.com/WordPress/gutenberg/blob/ff56d57b3b05c7e3459f7b07ecb93c24223e215a/packages/block-library/src/search/edit.native.js#L304-L325
- Contact Info
- https://github.com/Automattic/jetpack/blob/721b4ca9140893491f50e48e80c3f039387624ca/projects/plugins/jetpack/extensions/blocks/contact-info/phone/edit.native.js#L13-L20
- https://github.com/Automattic/jetpack/blob/721b4ca9140893491f50e48e80c3f039387624ca/projects/plugins/jetpack/extensions/blocks/contact-info/common.native.js#L36-L38
- https://github.com/Automattic/jetpack/blob/721b4ca9140893491f50e48e80c3f039387624ca/projects/plugins/jetpack/extensions/shared/simple-input.native.js#L12-L19
- Shortcode block
- https://github.com/WordPress/gutenberg/blob/ff56d57b3b05c7e3459f7b07ecb93c24223e215a/packages/block-library/src/shortcode/edit.native.js#L43-L57
This issue has been solved for the Shortcode block in https://github.com/WordPress/gutenberg/pull/41155. The same workaround applied in that PR could be expanded to the rest of the affecting blocks but will be done in separate PRs.