Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlay behavior #4

Open
3 tasks
maethu opened this issue Sep 8, 2016 · 4 comments
Open
3 tasks

Overlay behavior #4

maethu opened this issue Sep 8, 2016 · 4 comments

Comments

@maethu
Copy link
Contributor

maethu commented Sep 8, 2016

  • Background should not be scrollable
  • Some kind of background fadeout
  • Close with ESC - only close this window not others.
@jone
Copy link
Member

jone commented Sep 8, 2016

  • close overlay when clicking on the background --> 7b69d95

@maethu
Copy link
Contributor Author

maethu commented Sep 8, 2016

@jone On nested overlayes its not that easy... even more if the don't know each other.

Example:

  1. Overlaye (Edit Overlay) -> Register keyup event for ESC to close the overlay
  2. Overlay (Refbrowser) -> Register keyup event for ESC to close the overlay.

So on ESC both overlays are closing... Since the refbrowser don't know anything about the simplelayout overlay and vice versa. It's also possible that the refbrowser overlay is not nested.

I guess we're no going to solve this problem, without a centralised overlay system :-( Which I don't want...

@jone
Copy link
Member

jone commented Sep 8, 2016

But this does not influence the close-on-click feature, since the click-handler can explicitly be registered on the background/fadeout <div>, which then will be "nestable".

On esc:
I'm not too familiar with the event handling mechanism, but in jQuery you can do a .one, which unregisters itself. When the handler prevents executing later handlers (something like e.stopPropagation??) and the last registered handler is called first, it should "jus work" when using .one, right?

@maethu
Copy link
Contributor Author

maethu commented Sep 8, 2016

Yep... the closing the Overlay by clinking somewhere outside of the overlay should be easy.

Nope. It's not that easy, since all keydown events are registered on the document you cannot really control the order in which the events are fired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants