mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-07 23:59:22 +03:00
Fix opening links in external browsers.
This commit is contained in:
parent
8849eb1186
commit
f715a6fca2
@ -216,12 +216,12 @@ describe "Window", ->
|
||||
|
||||
$("<a href='http://github.com'>the website</a>").appendTo(document.body).click().remove()
|
||||
expect(shell.openExternal).toHaveBeenCalled()
|
||||
expect(shell.openExternal.argsForCall[0]).toBe "http://github.com"
|
||||
expect(shell.openExternal.argsForCall[0][0]).toBe "http://github.com"
|
||||
|
||||
shell.openExternal.reset()
|
||||
$("<a href='https://github.com'>the website</a>").appendTo(document.body).click().remove()
|
||||
expect(shell.openExternal).toHaveBeenCalled()
|
||||
expect(shell.openExternal.argsForCall[0]).toBe "https://github.com"
|
||||
expect(shell.openExternal.argsForCall[0][0]).toBe "https://github.com"
|
||||
|
||||
shell.openExternal.reset()
|
||||
$("<a href=''>the website</a>").appendTo(document.body).click().remove()
|
||||
|
@ -36,7 +36,7 @@ class WindowEventHandler
|
||||
return if location[0] is '#'
|
||||
|
||||
if location.indexOf('https://') is 0 or location.indexOf('http://') is 0
|
||||
require('child_process').spawn('open', [location])
|
||||
require('shell').openExternal location
|
||||
false
|
||||
|
||||
eachTabIndexedElement: (callback) ->
|
||||
|
Loading…
Reference in New Issue
Block a user