Fire markdown link on mouse down

Julia created

Previously any amount of mouse movement would disqualify the mouse down
and up from being a click, being a drag instead, which is a long
standing UX issue. We can get away with just firing on mouse down here
for now

Change summary

crates/editor/src/editor.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/editor/src/editor.rs 🔗

@@ -154,7 +154,7 @@ pub fn render_parsed_markdown<Tag: 'static>(
                 });
                 cx.scene().push_mouse_region(
                     MouseRegion::new::<(RenderedMarkdown, Tag)>(view_id, region_id, bounds)
-                        .on_click::<Editor, _>(MouseButton::Left, move |_, _, cx| {
+                        .on_down::<Editor, _>(MouseButton::Left, move |_, _, cx| {
                             cx.platform().open_url(&url)
                         }),
                 );