Skip to content

Commit

Permalink
Fix for CodeHint Description CSS Issue (adobe#14728)
Browse files Browse the repository at this point in the history
* Fix for overlapping dropdown div

* Cleanup #1
  • Loading branch information
shubhsnov authored and swmitra committed Apr 25, 2019
1 parent 1b13b49 commit 188c125
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/editor/CodeHintList.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,12 @@ define(function (require, exports, module) {
// attach to DOM
$parent.append($ul);

$parent.find(".hint-list-offset").remove();
$("<div class='hint-list-offset'></div>").appendTo($parent);

// If a a description field requested attach one
if (this.enableDescription) {
// Remove the desc element first to ensure DOM order
$parent.find("#codehint-desc").remove();
$parent.append("<div id='codehint-desc' class='dropdown-menu quiet-scrollbars'></div>");
$ul.addClass("withDesc");
$parent.find(".hint-list-offset").addClass("withDesc");
}
this._setSelectedIndex(selectInitial ? 0 : -1);
}
Expand Down Expand Up @@ -323,7 +319,7 @@ define(function (require, exports, module) {
if (descOffset === 0) {
descOffset = menuHeight - descOverhang;
}
this.$hintMenu.find(".hint-list-offset").css("height", descOffset - 1);
this.$hintMenu.find("#codehint-desc").css("margin-top", descOffset - 1);

return {left: posLeft, top: posTop, width: availableWidth};
};
Expand Down
3 changes: 1 addition & 2 deletions src/styles/brackets_patterns_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,10 @@ a:focus {

#codehint-desc {
background: @bc-codehint-desc;
position: relative;
position: absolute;
width: 100%;
box-sizing: border-box;
float: left;
top: 34px;
border-radius: 1px !important;
border-top-left-radius: 0px !important;
border-top-right-radius: 0px !important;
Expand Down

0 comments on commit 188c125

Please sign in to comment.