Skip to content

Commit

Permalink
Small display fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusWME committed Apr 19, 2016
1 parent 320370b commit f1d0a07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#pcgf_pmnamesuggestionlist > ul {
display: inline-block;
list-style: none;
margin-bottom: 0px;
margin-bottom: 0;
}

#pcgf_pmnamesuggestionlist > ul > li {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function hideSuggestions() {
function setSuggestionPosition() {
// Position the suggestion list under the current line of the user list
var userListPosition = pcgfUserList.position();
var currentLine = pcgfUserList.val().substr(0, pcgfUserList.prop('selectionStart')).split('\n').length;
var currentLine = pcgfUserList.val();
currentLine = currentLine.substr(0, pcgfUserList.prop('selectionStart')).split('\n').length;
pcgfSuggestionList.css({display: 'inline-block', left: userListPosition.left, top: userListPosition.top + (currentLine * parseInt(pcgfUserList.css('line-height'))) + 5});
}

Expand All @@ -36,7 +37,7 @@ function setPMName(name) {
hideSuggestions();
}

$(window).resize(function(e) {
$(window).resize(function() {
// Refresh the position of the suggestion list when the screen resizes
setSuggestionPosition();
});
Expand Down Expand Up @@ -108,7 +109,6 @@ pcgfUserList.on('keydown', function(e) {
if (pcgfKeyCatched > 0) {
e.preventDefault();
e.stopPropagation();
return;
}
}
});
Expand Down Expand Up @@ -139,7 +139,7 @@ pcgfUserList.on('keyup', function(e) {
pcgfLastSearchValue = '';
} else {
// If name is already entered don't show it
var singleMatch = null;
var singleMatch;
var matches = [];
var regex = /<li.*?><img.*?\/>(.*?)<\/li>/gi;
while ((singleMatch = regex.exec(result))) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pcgf_pmnamesuggestionlist.hidden {
#pcgf_pmnamesuggestionlist.pcgf-hidden {
display: none;
}

Expand Down

0 comments on commit f1d0a07

Please sign in to comment.