Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Fix dropdown menu not opening for desktop-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigocam authored and pablodiegoss committed Nov 15, 2018
1 parent faab619 commit f81ef92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/assets/js/comment-form-animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function showForm(button) {
$(document).click(function(event) {
if(!$(event.target).closest('#commentform').length && !$(event.target).closest('#button-create').length) {
var commentform = document.getElementById("commentform");
if(commentform.className == "show") {
if(commentform && commentform.className == "show") {
button = document.getElementsByClassName('fas fa-times')[0];
makeFormDisappear(commentform, button);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// this function controls the open/close button of "conversations dropdown on page_menu
function openDropDown(openDiv) {
let elements = document.getElementsByClassName(openDiv);
let element = elements[1]
let element = ((elements.length > 1) ? elements[1] : elements[0]);
if (element.style.display === "inline")
element.style.display = "none";
else
Expand Down

0 comments on commit f81ef92

Please sign in to comment.