History

Extract the right target for clicks on nested elements

Stefan Selent committed 7 years ago

Commit ea574871 parent ec252ca1 file · +1 −1Browse files

Unified · Split

assets/javascripts/views/content/offline_page.coffee+1−1
@@ -56,7 +56,7 @@ class app.views.OfflinePage extends app.View · 55 unmodified lines
5656 action = 'install' if action is 'update'
5757 doc[action](@onInstallSuccess.bind(@, doc), @onInstallError.bind(@, doc), @onInstallProgress.bind(@, doc))
5858 el.parentNode.innerHTML = "#{el.textContent.replace(/e$/, '')}ing…"
59− else if action = el.getAttribute('data-action-all')
59+ else if action = el.getAttribute('data-action-all') || el.parentElement.getAttribute('data-action-all')
6060 return unless action isnt 'uninstall' or window.confirm('Uninstall all docs?')
6161 app.db.migrate()
6262 $.click(el) for el in @findAll("[data-action='#{action}']")