Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make close-and-halt work on new tabs in Chrome #4410

Merged
merged 1 commit into from Nov 1, 2013

Conversation

ivanov
Copy link
Member

@ivanov ivanov commented Oct 21, 2013

If you open a notebook via right-click open-in-new-tab, the close-and-halt menu
item will not work. This commit fixes the issue for Chromium and IE. It is not
possible in Firefox, as new tabs/windows which were not opened via a script (
window.open call ) are not allowed to be closed via window.close and will yield
a message like:

[11:50:59.691] Scripts may not close windows that were not opened by script. @
http://localhost:8888/static/notebook/js/menubar.js:105

@minrk
Copy link
Member

minrk commented Oct 21, 2013

Is the issue just that it's called in a timeout? Would it work if it was called directly in the click event?
If so, we might be able to call kill with async: false and then close the window rather than setting a timeout and decoupling the click event from the close action.

@ivanov
Copy link
Member Author

ivanov commented Oct 22, 2013

we just investigated this, and it is not an issue with the timeout.

@Carreau
Copy link
Member

Carreau commented Oct 27, 2013

Need rebase, don't be :rage1: .

this is not possible in Firefox, as new tabs/windows which were *not*
opened via a script ( window.open call ) are not allowed to be closed
via window.close and will yield a message like

--
[11:50:59.691] Scripts may not close windows that were not opened by script. @ http://localhost:8888/static/notebook/js/menubar.js:105
@ivanov
Copy link
Member Author

ivanov commented Oct 28, 2013

Matthias Bussonnier, on 2013-10-27 04:52, wrote:

Need rebase, don't be :rage1: .

thanks for the reminder, @Carreau, rebased!

there's not :rage2: when there's ☕

ivanov added a commit that referenced this pull request Nov 1, 2013
make close-and-halt work on new tabs in Chrome
@ivanov ivanov merged commit d5d3bf5 into ipython:master Nov 1, 2013
@ivanov ivanov deleted the close-new-tabs-chrome branch November 1, 2013 19:53
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
make close-and-halt work on new tabs in Chrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants