AllanChain / logseq-live-math

Type LaTeX in live mode!
Apache License 2.0
46 stars 2 forks source link

Closing the mathlive window upon unfocus #4

Closed YuvMilo closed 1 year ago

YuvMilo commented 1 year ago

It seems that when unfocusing from Math Live - The Math Live window stays open. This is (in my opinion) a sub-optimal default for two reasons:

  1. This is inconsistent with the logseq app (leaving a block editing will not result in staying in editing mode)
  2. This adds friction- unfocusing is an explicit action meant to change the current editing context, there's no use in adding a requirement for another action to "double-check" if the user was indeed meant to leave the Math-live context.
AllanChain commented 1 year ago

A fix (59b3ba8) is included in v1.1.7, but it's a workaround: instead of detecting unfocus, clicking outside is used to close the popup.

Feel free to reopen this issue if there are some edge cases where click-outside-to-close doesn't meet the needs.