Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

How can I close the floating styles-widget when clicking outside editable area? #200

Open
kindmind opened this issue Mar 25, 2020 · 0 comments

Comments

@kindmind
Copy link

kindmind commented Mar 25, 2020

Big thanks @brijeshb42 and other contributors on this package鈥攊t's very nice 馃檶

I've noticed that an open/floating medium-draft styles widget/menu does not close when you click outside the text-editable area (e.g. click on page background). This seems like basic, expected behavior which all other medium-clones I've come across have implemented.

  1. Highlight some text so the medium-draft styles menu appears
  2. Click on the page background or some other element on the page

Result: the medium-draft styles menu is still visible
Expected: the styles menu is hidden

So this might be a feature request or maybe it's a feature 馃し鈥嶁檪

Is there something like a "closeWidget" function I can call when used in conjunction with an "onClickOutside" callback?

@kindmind kindmind changed the title Question: how to close floating styles widget when clicking outside editable area? How can I close the floating styles-widget when clicking outside editable area? Mar 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant