Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix issue with invalid hint hiding after code was changed #7235

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */
/*global define, brackets */
/*global define, brackets, $ */

/**
* Utilities functions related to color matching
Expand Down Expand Up @@ -258,15 +258,18 @@ define(function (require, exports, module) {
return;
}

$(editor.hint[0]).removeClass("fadeout");
if (show) {
editor.hintShown = true;
editor.hint.html(StringUtils.format(Strings.INLINE_TIMING_EDITOR_INVALID, documentCode, editorCode));
editor.hint.css("display", "block");
} else if (editor.hintShown) {
editor.hintShown = false;
AnimationUtils.animateUsingClass(editor.hint[0], "fadeout")
.done(function () {
editor.hint.css("display", "none");
editor.hintShown = false;
if (!editor.hintShown) {
editor.hint.css("display", "none");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not .hide(); instead of .css("display", "none"); ?
https://api.jquery.com/hide/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just refactors the existing code, so I think it's ok.

}
});
} else {
editor.hint.css("display", "none");
Expand Down