Skip to content

Commit 097b328

Browse files
ESWATThibaut
authored andcommitted
_notif-close element is now an anchor instead of div
Now closing a notification can be done with keyboard navigation and extensions like Vimium
1 parent deb91d8 commit 097b328

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

assets/javascripts/templates/notif_tmpl.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
notif = (title, html) ->
22
html = html.replace /<a/g, '<a class="_notif-link"'
3-
"""<h5 class="_notif-title">#{title}</h5>#{html}<div class="_notif-close"></div>"""
3+
"""<h5 class="_notif-title">#{title}</h5>#{html}<a href="#" class="_notif-close"></a>"""
44

55
textNotif = (title, message) ->
66
notif title, """<p class="_notif-text">#{message}"""

assets/javascripts/views/misc/notif.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class app.views.Notif extends app.View
4848
return
4949

5050
onClick: (event) =>
51-
unless event.target.tagName is 'A'
51+
if event.target.tagName isnt 'A' or event.target.classList.contains('_notif-close')
5252
$.stopEvent(event)
5353
@hide()
5454
return

0 commit comments

Comments
 (0)