mkremins / flense

Edit trees, not text
MIT License
101 stars 3 forks source link

Stringlike :editing? not always consistent with DOM focus #50

Closed mkremins closed 9 years ago

mkremins commented 10 years ago

The :editing? attribute on a stringlike parse tree node is meant to indicate whether key events occurring while the node is selected should be mapped to text editing actions within the stringlike node, or to ordinary structural editing actions. When :editing? is falsey, it should not be possible to edit text within the node, as the node's DOM element should not be selected or focused from the user's perspective. Unfortunately this is currently not always the case.

I honestly have no idea how to go about solving this. Implementing #48 would almost certainly deal with this issue (if we're not using native <textarea> there's no need to worry about the DOM's definition of focus or selection anymore) but it'd be nice to understand why the desynchronization is happening and what could be done to patch it out without resorting to such drastic measures.

This also seems like it could be related to the weird stringlike-related display and input issues downstream in flense-demo. Resolving this issue might cause some or all of the downstream trouble to clear up.

mkremins commented 9 years ago

Fixed in commit 26554ab4c4e17496ee06b71294e06d7b8c035ab4 as a side effect of fixing #48.