Skip to content

Commit

Permalink
Fix voted budgets and title bar hidden by focus mode (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vera Rojman authored and leio10 committed Jul 22, 2021
1 parent 5c47ca8 commit e576408
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if !voting_finished? && (voted?) %>
<% if voted? %>
<div class="section">
<h3 class="section-heading">
<%= t(:my_budgets, scope: i18n_scope) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ $(() => {
}

const initializeFocusMode = () => {
const focusModePresent = !!$focusModeOn.length;

$closer.on("click", () => { focusModeOff(FADEOUT_TIME) });

if ($opener.length) $opener.on("click", () => { focusModeOn(FADEOUT_TIME) });

if (window.matchMedia('(min-width: 800px)').matches) {
if (focusModePresent > 0 && window.matchMedia('(min-width: 800px)').matches) {
focusModeOn(0);
} else {
focusModeOff(0);
Expand Down

0 comments on commit e576408

Please sign in to comment.