0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -05:00
Commit graph

7 commits

Author SHA1 Message Date
Neil Jenkins
9f5df9e5c0 Fix format intent lost after pressing Space
On Chrome, if you made an inline formatting change, this would insert a
new <span> with a ZWS inside so we could focus it. Pressing Space would
remove this ZWS resulting in the focus ending up outside and so the
formatting would be lost. We were removing the ZWS so we could check
if we were at a block boundary correctly; instead, I've made it so the
boundary check can handle trailing or leading ZWS (see previous commit).
2023-09-27 14:56:00 +10:00
Neil Jenkins
edde44a924 Auto-format list if starting line with * or 1. 2023-09-19 14:45:15 +08:00
Neil Jenkins
cbde45311a Fix crash linkifying text in middle of node
We were looking at the selection properties after we had mutated the DOM, and
trying to manipulate them based on some numbers cached from before mutating
the DOM, which could result in trying to set a negative index for the selection
offset. Instead, calculate all our values before we do any mutations.

Fixes #430
2023-04-20 10:57:05 +10:00
Neil Jenkins
8304fd3e04 Let ArrowRight key always break out of <code> 2023-02-22 16:01:23 +11:00
Neil Jenkins
cf30a69b89 Fix backspace can delete two characters
If we're handling the backspace completely ourselves, must prevent
default to stop the browser also having a go.
2023-02-22 11:27:16 +11:00
Neil Jenkins
1904405ab8 Auto delink if backspacing inside auto-linked URL
This means if you make a mistake and backspace, you don't end up
accidentally fixing the text but leaving the link to the wrong URL.
2023-02-01 14:20:53 +11:00
Neil Jenkins
fe0dfdf6c4 Squire 2.0
This is a massive refactor to port Squire to TypeScript, fix a bunch of small
bugs and modernise our tooling. The development was done on an internal
repository, so apologies to anyone following externally for the commit dump;
updates from here should come as real commits again.

Co-authored-by: Joe Woods <woods@fastmailteam.com>
2023-01-23 13:18:29 +11:00