1
0
Эх сурвалжийг харах

Fix $.popup in some browsers

Thibaut Courouble 9 жил өмнө
parent
commit
3cd05ae6ae

+ 5 - 2
assets/javascripts/lib/util.coffee

@@ -329,8 +329,11 @@ $.noop = ->
 
 $.popup = (value) ->
   win = window.open()
-  win.opener = null if win.opener
-  win.location = value.href or value
+  if win
+    win.opener = null if win.opener
+    win.location = value.href or value
+  else
+    window.open value.href or value, '_blank'
   return
 
 $.isTouchScreen = ->