Skip to content

Commit a0fcc4e

Browse files
committed
Emoji menu overlaps text (fixes jerone#92);
1 parent 8997260 commit a0fcc4e

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Github_Comment_Enhancer/Github_Comment_Enhancer.user.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// @updateURL https://github.com/jerone/UserScripts/raw/master/Github_Comment_Enhancer/Github_Comment_Enhancer.user.js
1313
// @supportURL https://github.com/jerone/UserScripts/issues
1414
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
15-
// @version 2.8.0
15+
// @version 2.8.1
1616
// @grant none
1717
// @run-at document-end
1818
// @include https://github.com/*
@@ -561,6 +561,11 @@
561561
}
562562
};
563563

564+
// The suggester container needs extra margin to move the menu below the text because of the added toolbar.
565+
function fixSuggesterMenu(commentForm){
566+
commentForm.parentNode.querySelector(".suggester-container").style.marginTop = "36px";
567+
}
568+
564569
var codeSyntaxTop = ["JavaScript", "Java", "Ruby", "PHP", "Python", "CSS", "C++", "C#", "C", "HTML"]; // https://github.com/blog/2047-language-trends-on-github
565570
var codeSyntaxList = ["ABAP", "abl", "aconf", "ActionScript", "actionscript 3",
566571
"actionscript3", "Ada", "ada2005", "ada95", "advpl", "Agda", "ags",
@@ -825,6 +830,8 @@
825830
commentForm.parentNode.insertBefore(gollumEditor, commentForm);
826831
}
827832

833+
fixSuggesterMenu(commentForm);
834+
828835
addSuggestions(commentForm);
829836

830837
addCodeSyntax(commentForm);

Github_Comment_Enhancer/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ Every comment field also got a toolbar, consisting of the following buttons:
6060

6161
## Version History
6262

63+
* **2.8.1**
64+
* Emoji menu overlaps text (fixes https://github.com/jerone/UserScripts/issues/92);
6365
* **2.8.0**
6466
* Reverted commit 9bf8974 to fix the toolbar on the wiki.
6567
* Included fix for enabling and disabling buttons per language on wiki.

0 commit comments

Comments
 (0)