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

focus lost event when clicking between 2 instances #1522

Open
masenocturnal opened this issue May 1, 2016 · 0 comments
Open

focus lost event when clicking between 2 instances #1522

masenocturnal opened this issue May 1, 2016 · 0 comments

Comments

@masenocturnal
Copy link

When clicking between 2 instances of aloha which have been bound to different editable elements
there is no focus lost event triggered.

e.g

..
..
..

Steps to reproduce:

  • Aloha is bound to both foo and bar but not rar.
    aloha(..query('#foo));
    aloha(..query('#bar));
  • Click on any child of @id=foo then click on any child of @id=rar
    an focus lost event is dispatched
  • Click on any child of @id=foo then click on any child of @id=bar
    an focus lost event is not dispatched

Expected / Wish?:

  • when ever the focus has been lost from the element that is currently being edited it should send a signal of some sort

Why ?

You have multiple content editable parts of a web page. When you click on a content editable area, the section of the page currently being edited is highlighted to inform the user where they are editing. If they switch away it would be nice to automatically send the content to be saved and remove the highlighting. Currently we have to keep track of the focus manually by looking at the currentTarget of the event.

This seems like a reasonably common use case and would be nice to have upstream.

Kind regards
Andrew

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

1 participant