Skip to content

Collect consecutive keypresses on input elems as "input" breadcrumb #562

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

Merged
merged 6 commits into from
Apr 28, 2016

Conversation

benvinegar
Copy link
Contributor

@benvinegar benvinegar commented Apr 28, 2016

  • Only considers keypresses on INPUT or TEXTAREA elements
  • Keypresses are debounced 1000ms; but a click or error will flush any queued capture
  • The first keypress in a series is recorded as the start of an "input" event; only > 1000ms without a typing event will cause it to reset

* Keypress events only considered on INPUT or TEXTAREA elems
* Remove generic debounce util method
* Tests
@benvinegar
Copy link
Contributor Author

Discussion: should we flush if any breadcrumb occurs in between keypresses? e.g. navigation change or XHR. For navigation change, I think we should. My concern w/ flushing on XHRs is lookahead search boxes – where an XHR could trigger in between keypresses, making for a really messy timeline.

Another idea: I switch the debounce so that the first keypress creates the breadcrumb, any we don't create a second one until the debounce clears. That should prevent shit from being out of order, and will simplify code because then I don't have to write manual flushes all over the place.

@benvinegar
Copy link
Contributor Author

benvinegar commented Apr 28, 2016

Another idea: I switch the debounce so that the first keypress creates the breadcrumb, any we don't create a second one until the debounce clears. That should prevent shit from being out of order, and will simplify code because then I don't have to write manual flushes all over the place.

Yeah I don't know why I didn't do that to begin with facepalm

Changing.

@benvinegar benvinegar merged commit f3a70ee into master Apr 28, 2016
@benvinegar benvinegar deleted the keypress branch April 28, 2016 21:18
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

Successfully merging this pull request may close these issues.

1 participant