Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

drag-and-drop bookmarklet to navigation bar causes whitescreen #1891

Closed
diracdeltas opened this issue May 23, 2016 · 4 comments · Fixed by #1917
Closed

drag-and-drop bookmarklet to navigation bar causes whitescreen #1891

diracdeltas opened this issue May 23, 2016 · 4 comments · Fixed by #1917

Comments

@diracdeltas
Copy link
Member

Did you search for similar issues before submitting this one?
yes

Describe the issue you encountered:
dragging and dropping a javascript: url to the navigation bar area (not the bookmarks toolbar) causes the browser to whitescreen. demo: open https://jsfiddle.net/r2ftho8k/ and drag the 'click me' link to the navbar.

Expected behavior:
nothing should happen

@diracdeltas diracdeltas added this to the 0.10.1dev milestone May 23, 2016
@diracdeltas
Copy link
Member Author

the top-level browser location is about:blank so not a security issue afaict

@diracdeltas
Copy link
Member Author

I think loading javascript: does not fire the will-navigate event, so we can't filter out the URL in our will-navigate handler. Probably as an XSS-prevention mechanism, the browser autoredirects to about:blank. I have a quick workaround but would be safer to either add a custom cancelable event in Electron for all webcontent location changes, or fastidiously add drop handlers in the browser window area.

cc @bridiver @bbondy

@bridiver
Copy link
Collaborator

bridiver commented May 23, 2016

will-navigate is explicitly not fired for certain types of navigation. Dragging the link causes a fatal error
[82653:0523/152955:ERROR:atom_bindings.cc(39)] Fatal error in V8: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope

@bridiver
Copy link
Collaborator

this is temporarily re-opened with 0d4098f and will be closed again by #1917 when it is merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants