Lag in selecting text

I’ve just been attempting to quote the Developer’s guide to Discourse Themes, and when I long-press to select text there’s a significant lag when I drag the cursors to extend the selection.

I’ve tried a few other topics to test, but they seem to work fine (wiki and DiscoToC ones). Not sure what the issue is, but thought it’d be rude to pass by and not mention it. :slightly_smiling_face:



I can repro the lag.

Looks like we call toMarkdown on the whole post. That post is almost 100k chars long, so it takes quite a while.

Maybe we can call the server to obtain the markdown here after a certain threshold ?


I don’t know … not sure we should add more edge cases there. Maybe we can eliminate this altogether?

I think the intent is to figure out if you selected an entire post … we can figure that out in other ways no maybe by looking at your HTML tree? @joffreyjaffeux could fast edit look directly at cooked for its heuristic?

1 Like