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

Todo Item intent: doneEdit action is fired twice on keyup:enter #25

Open
saitodisse opened this issue Jan 31, 2016 · 0 comments
Open

Todo Item intent: doneEdit action is fired twice on keyup:enter #25

saitodisse opened this issue Jan 31, 2016 · 0 comments
Labels

Comments

@saitodisse
Copy link

Hi,
At this point

DOM.select('.edit').events('keyup')
.filter(ev => ev.keyCode === ENTER_KEY)
.merge(DOM.select('.edit').events('blur', true))
.map(ev => ({title: ev.target.value, type: 'doneEdit'}))
)
keyup
and blur are fired when ENTER key is pressed. That way the model is written two times to localstorage.

How can we ignore blur event when keyup:ENTER is fired?
This should be done on intent or on model?

Sorry, I'm still learning RxJS.

@staltz staltz added the bug label Feb 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants