Skip to content

Instantly share code, notes, and snippets.

@frpaulas
Created June 27, 2016 21:59
Show Gist options
  • Save frpaulas/983d44ade3b144c9361e28986048f8a3 to your computer and use it in GitHub Desktop.
Save frpaulas/983d44ade3b144c9361e28986048f8a3 to your computer and use it in GitHub Desktop.
Second modal cause repeated reloads with iOS 9+ safari
<div id= "header-elm-container"></div>
<div>
<table id= "calendar">
<tr>
<th class= "mpep_link" colspan= "3"><a href= "morningPrayer"><button>Morning Prayer</button></a></th>
<th class= "mpep_link">Today</th>
<th class= "mpep_link" colspan= "3"><a href= "eveningPrayer"><button>Evening Prayer</button></a></th>
</tr>
<tr>
<th class= "season_link" colspan= "2">
<a href= "<%="/calendar/next/advent"%>" >
<button class= "season_button" data-season= "Advent">Advent</button>
</a>
</th>
<th class= "season_link">
<a href= "<%="/calendar/next/epiphany"%>" >
<button class= "season_button" data-season= "Epiphany">Epiphany</button>
</a>
</th>
<th class= "season_link">
<a href= "<%="/calendar/next/lent"%>" >
<button class= "season_button" data-season= "Lent">Lent</button>
</a>
</th>
<th class= "season_link">
<a href= "<%="/calendar/next/easter"%>" >
<button class= "season_button" data-season= "Easter">Easter</button>
</a>
</th>
<th class= "season_link" colspan= "2">
<a href= "<%="/calendar/next/pentecost"%>" >
<button class= "season_button" data-season= "Pentecost">Pentecost</button>
</a>
</th>
</tr>
<tr>
<th class= "cal_move_month">
<a href= "<%="/calendar/prev/#{@model.month}/#{@model.year}"%>" ><</a>
</th>
<th colspan= "5"><%= "#{@model.month}, #{@model.year}"%></th>
<th class= "cal_move_month">
<a href= "<%="/calendar/next/#{@model.month}/#{@model.year}"%>" >></a>
</th>
</tr>
<tr class= "calendar-week">
<th>Sun</th>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thu</th>
<th>Fri</th>
<th>Sat</th>
</tr>
<%= for week <- @model.calendar do %>
<tr class= "calendar-week">
<%= for day <- week.days do %>
<td class="<%= if day.today, do: 'today', else: '' %>" >
<span>
<a href= "#<%=day.id%>_color" class= "color_options">
<p class= "<%="day_of_month day_#{hd day.colors}"%>"><%=day.dayOfMonth%></p>
</a>
<div id= "<%=day.id%>_color" class= "modalDialog">
<div>
<a href= "#close<%=day.id%>_color", title= "Close", class= "close">X</a>
<h2 class= "modal_header">Color Options</h2>
<ul>
<%= for color <- day.colors do %>
<li><%= color %></li>
<% end %>
</ul>
</div>
</div>
</span>
<span>
<a href= "#<%=day.id%>_readings" class= "color_options">
<p class= "cal_day_title"><%=day.title%></p>
</a>
<div id= "<%=day.id%>_readings" class= "modalDialog">
<div>
<a href= "#close<%=day.id%>_readings", title= "Close", class= "close">X</a>
<h2 class= "modal_header">Readings for Today</h2>
<p>HEy HI</p>
</div>
</div>
</span>
<ul class= "day_options">
<li class= "reading_group">
<button class= "reading_button" data-date= "<%=day.date%>" data-type= "MP">MP</button></li>
<li class= "reading_group">
<button class= "reading_button" data-date= "<%=day.date%>" data-type= "EP" >EP</button></li>
<li class= "reading_group">
<button class= "reading_button" data-date= "<%=day.date%>" data-type= "EU" >EU</button></li>
</ul>
</td>
<% end %>
</tr>
<% end %>
<tr>
<td id="table-rollup" colspan= "7">
<button id= "rollup">Roll Up</button>
</td>
</tr>
</table>
</div>
<div id="cal-elm-container"></div>
@frpaulas
Copy link
Author

lns 75 - 86 on iOS 9+ safari browser seems to cause a looping of page reloads which ultimately ends in my iphone displaying A problem repeatedly occured. If I remove lns 79-85. The problem "goes away". Why the first modal (lns 62-72) does not cause this error is beyond me. Also, If I touch the link at lns 76-78 before too many reloads, the modal correctly displays.

To see the expected behavior go to legereme.com and click day of month title (e.g. Wednesday) on a desktop. To see failure, do same w/ iOS 9+ safari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment