This repository was archived by the owner on Jan 22, 2019. It is now read-only.
fix: prevent multiple command palettes from being added#178
Merged
chrismwendt merged 2 commits intomasterfrom Sep 14, 2018
Merged
fix: prevent multiple command palettes from being added#178chrismwendt merged 2 commits intomasterfrom
chrismwendt merged 2 commits intomasterfrom
Conversation
ijsnow
approved these changes
Sep 14, 2018
|
|
||
| function createCommandList(): HTMLElement { | ||
| const commandListElem = document.createElement('div') | ||
| commandListElem.className = commandListClass |
There was a problem hiding this comment.
Doesn't really matter here since you're creating the element from scratch but I always use element.classList.add
|
🎉 This PR is included in version 1.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is really hacky (uses a flag to check if the palette has already been added), but it was quick to implement.
In parallel with reviews of this PR, I'll be working on a more robust solution involving each
inject*function returning aDisposable/Unsubscribablethat the top level can dispose of when lifecycle events occur.Resolves #174
Resolves https://github.com/sourcegraph/sourcegraph/issues/13206