History

Fix $.popup in some browsers

Thibaut Courouble committed 10 years ago

Commit 3cd05ae1 parent af899841 file · +5 −2Browse files

Showing the changes to assets/javascripts (1 of 1 file). Show all

Unified · Split

assets/javascripts/lib/util.coffee+5−2
@@ -329,8 +329,11 @@ $.noop = -> · 328 unmodified lines
329329
330330 $.popup = (value) ->
331331 win = window.open()
332− win.opener = null if win.opener
333− win.location = value.href or value
332+ if win
333+ win.opener = null if win.opener
334+ win.location = value.href or value
335+ else
336+ window.open value.href or value, '_blank'
334337 return
335338
336339 $.isTouchScreen = ->