day8 / re-frame

A ClojureScript framework for building user interfaces, leveraging React
http://day8.github.io/re-frame/
MIT License
5.42k stars 715 forks source link

Focus & cursor position lost in contenteditable components #404

Closed mtruyens closed 7 years ago

mtruyens commented 7 years ago

I'm creating an online editor that uses a contenteditable component (I'm using the — excellent! — SlateJS React-based editor).

When re-frame's database is updated (using dispatch or dispatch-sync) while the cursor is within the contenteditable component, the focus is lost. Moreover, on programmatically re-focusing the component, the position of the cursor is lost...

This problem does not occur with mere Reagent.

mtruyens commented 7 years ago

Apologies, it turned out to be a subtle bug elsewhere.