-
Notifications
You must be signed in to change notification settings - Fork 968
Description
Have you checked for an existing issue?
- I have searched the existing issues
Flutter Quill Version
11.4.2
Steps to Reproduce
-
Create a QuillEditorImageEmbedConfig(onImageClicked: ...) or subclass with forceClick.
-
Pass it into your editor via
FlutterQuillEmbeds.editorBuilders(imageEmbedConfig: myConfig)
-
Tap once on any image → nothing happens; keyboard shows or caret moves instead.
Expected results
On any normal tap (down→up within slop) on an image embed, or custom embed immediately invoke my callback, and do not let Quill move the caret.
Scrolling/drags when touching the image should continue to work naturally.
Actual results
Quick taps do not fire onImageClicked, or custom Embed onTap.
Long-press opens the default “image options” menu (but I need single-tap).
All hacks to intercept pointer events either break scrolling or still flash the keyboard.
Additional Context
Workarounds tried
-
forceClick: true on QuillEditorImageEmbedConfig
-
RawGestureDetector → swallowed by Quill
-
Listener(onPointerDown)…cancelPointer → works, but breaks scroll
-
Custom EmbedBuilder with
- expanded: true
- manually inserting leading/trailing newlines
- wrapping my own GestureDetector/Listener around the image widget
- → no onTap ever fires (or else listener breaks scrolling/keyboard)
- Delaying cancelPointer via Future.microtask → erratic behavior
Request / Questions
Is there any supported way to get a single-tap callback on an image embed? either built in or custom embed?
If not, can onImageClicked be wired to tapUp (not only long-press) on mobile by default?
Alternatively, would you consider exposing a skipKeyboardRequest flag so I can suppress the built-in focus/keyboard on a tap?
Thanks for any guidance or if you can point me toward a clean API for this use-case!