Repository navigation
Reliable merge box handlers - #2019
Merged
Merged
Conversation
And make it more reliable. Firefox and Chrome had opposite `event.detail.open` values
Now also appears after `session:resume` and doesn't add unnecessary line-breaks
7 tasks done
fregante
commented
May 10, 2019
| callback(event); | ||
| } | ||
| }); | ||
|
|
Member
Author
There was a problem hiding this comment.
I love this pattern.
Since addEventListener doesn't add the same handler twice, it's important that the same exact handler is passed every time. To do this I always use a WeakMap and an ugly sequence of get or create, then set and return, but I think I finally found a way to hide this complexity with mem.
Member
There was a problem hiding this comment.
I like this pattern a lot 👍
fregante
marked this pull request as ready for review
May 15, 2019 16:05
fregante
commented
May 15, 2019
fregante
left a comment
Member
Author
There was a problem hiding this comment.
This PR is good to go too
sindresorhus
approved these changes
May 17, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Depends on sindresorhus/memoize#35
Maybe these could benefit from this as well, once they're merged:
#1950(edit: no, the button appears outside the form, not inside)wait-for-build#2023 (✅ 966e14b)Reason of the changes:
details:toggledwas unreliable (small fix)fit-textareaswas being called from an unrelated featureadd-co-authored-bywasn't being added when the session was restored (i.e. type a new PR title and reload the page)add-co-authored-bywas listening to a click on a button, which conflicted with the future Addupdate-pr-from-base-branchfeature #1950