ember-key-responder
ember-key-responder copied to clipboard
becomeKeyResponder replaces by default
The following is required to get the stack behavior.
this.becomeKeyResponder(false);
I would like to propose the stack behavior should be the default.
Maybe different API for each case?
this.becomeKeyResponder(); // pushes onto the stack
this.replaceKeyResponder(); // replaces the stop of the stack
relevant code: https://github.com/yapplabs/ember-key-responder/blob/master/app/key-responder.js#L127-L131
pros:
- clear
cons:
- breaking change
- more API
Making push behavior the default doesn't seem to line up with what we do most often. I like the different API for each case idea.
@raycohen maybe we leave becomeKeyResponder + deprecate, but then add pushKeyResponder and replaceKeyResponder for added clarity moving forward?
thumbs up
On Fri, Jan 2, 2015 at 5:28 PM, Stefan Penner [email protected] wrote:
@raycohen https://github.com/raycohen maybe we leave becomeKeyResponder
- deprecate, but then add pushKeyResponder and replaceKeyResponder for added clarity moving forward?
— Reply to this email directly or view it on GitHub https://github.com/yapplabs/ember-key-responder/issues/6#issuecomment-68568668 .
I like it.
On Fri, Jan 2, 2015 at 2:36 PM, Ray Cohen [email protected] wrote:
thumbs up
On Fri, Jan 2, 2015 at 5:28 PM, Stefan Penner [email protected] wrote:
@raycohen https://github.com/raycohen maybe we leave becomeKeyResponder
- deprecate, but then add pushKeyResponder and replaceKeyResponder for added clarity moving forward?
— Reply to this email directly or view it on GitHub < https://github.com/yapplabs/ember-key-responder/issues/6#issuecomment-68568668>
.
— Reply to this email directly or view it on GitHub https://github.com/yapplabs/ember-key-responder/issues/6#issuecomment-68569271 .
Multiple methods always beats one method with flags to change behavior 😀