Closed caffodian closed 8 years ago
Although this normally shouldn't matter, there seems to be a strange interaction between:
Also, more importantly, marking doesn't actually work if you try to use a mutation insensitive bookmark. Which I knew, but I missed the short circuit case.
..we can't refactor it because it makes the check vs. render decision on a block to block basis, as well. will get better when we refactor things out.
summary of my rambling, so that I remember why I can't test this easily:
This is actually an interaction of a few things:
how this could be tested better: pass the output of getHtmlWithSelection into spellcheck cases, hopefully it doesn't get broken by testcase html normalization.
Argh. Because getData()
cleans the html of spellcheck spans, it is not possible to assert where the spans are + ensure selection is stable in the same call.
I am glad I persisted in trying to get it tested, because there is actually a related bug related to having two bookmarks beside each other. :/
Looks good! Hooray for fewer selection manipulations.
technically this is more (vs. the previous version, but not the version before that.) This does fix the nasty gross bugs around double-bookmarking that i accidentally caused in the previous version, though, while keeping most of the performance benefits
Ugh. There is a weird undo bug around adding more to a typo, waiting for spellcheck, and then undoing it
technically this is more
Hrm. Maybe I'm misunderstanding, then. I thought you're now storing a bookmark to the current selection more often, but no longer manipulating the selection (e.g. modifying the current selection to match the selection that was stored in the bookmark).
Hrm. Maybe I'm misunderstanding, then. I thought you're now storing a bookmark to the current selection more often, but no longer manipulating the selection (e.g. modifying the current selection to match the selection that was stored in the bookmark).
Oh, yea. From that perspective, there is less selection manipulation. I sometimes mix up "bookmark derived from selection" & selection itself
I feel like there are still some things we are doing wrong, but they can be more easily improved when we also stop doing bookmarks when not needed. ( #38 )
It has some...problems with the current approach. This is a quick fix, that won't take too much thought, until I wrangle all the other bookmarking issues in #38
This also fixes the problem where multiple selection bookmarks are created in the shortcut case.