Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Contextmenu bugfix (#50)
Browse files Browse the repository at this point in the history
Co-authored-by: danthe3rd <danthe3rd@users.noreply.github.com>
  • Loading branch information
danthe3rd and danthe3rd authored Apr 14, 2020
1 parent 865e613 commit 4f91284
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/contextmenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export class ContextMenu extends React.Component<ContextMenuProps, ContextMenuSt
cm.style.top = `${this.state.top}px`;
cm.style.left = `${this.state.left}px`;
cm.classList.toggle('show', this.state.visible);
if (this.state.visible && !prevState.visible) {
const needsUpdate = (this.state.visible && !prevState.visible) ||
(this.state.column != prevState.column);
if (needsUpdate) {
cm.innerHTML = '';
var me = this;
this.trigger_callbacks.forEach(function(trigger) {
Expand Down

0 comments on commit 4f91284

Please sign in to comment.