From 7329d1301aa16f7b6e2b816b1e23d18567c10592 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Mon, 4 Feb 2019 19:08:43 -0500 Subject: [PATCH] Fix issues where save button would not enable and save blocker tooltip would not disappear --- modules/ui/commit.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ui/commit.js b/modules/ui/commit.js index 084bc6462..d28eab79d 100644 --- a/modules/ui/commit.js +++ b/modules/ui/commit.js @@ -273,7 +273,7 @@ export function uiCommit(context) { .attr('class', 'label') .text(t('commit.save')); - var uploadBlockerTooltip = getUploadBlockerMessage(); + var uploadBlockerTooltipText = getUploadBlockerMessage(); // update buttonSection = buttonSection @@ -286,7 +286,7 @@ export function uiCommit(context) { }); buttonSection.selectAll('.save-button') - .classed('disabled', uploadBlockerTooltip !== undefined) + .classed('disabled', uploadBlockerTooltipText !== null) .on('click.save', function() { if (!d3_select(this).classed('disabled')) { this.blur(); // avoid keeping focus on the button - #4641 @@ -295,11 +295,11 @@ export function uiCommit(context) { }); // remove any existing tooltip - buttonSection.selectAll('.save-button .tooltip').remove(); + tooltip().destroyAny(buttonSection.selectAll('.save-button')); - if (uploadBlockerTooltip) { + if (uploadBlockerTooltipText) { buttonSection.selectAll('.save-button') - .call(tooltip().title(uploadBlockerTooltip).placement('top')); + .call(tooltip().title(uploadBlockerTooltipText).placement('top')); } // Raw Tag Editor @@ -493,4 +493,4 @@ export function uiCommit(context) { return utilRebind(commit, dispatch, 'on'); -} \ No newline at end of file +}