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

Console/Editor lose focus when auto-connected to help #3317

Closed
Keou0007 opened this issue Jul 22, 2016 · 8 comments
Closed

Console/Editor lose focus when auto-connected to help #3317

Keou0007 opened this issue Jul 22, 2016 · 8 comments

Comments

@Keou0007
Copy link
Contributor

Description of your problem

  1. Open spyder
  2. Enable automatic connection to help in settings
  3. Type in editor or console until the help connects, either by function(, or function? in the console

Expected behaviour is for the help for that function to show and I can continue typing my code.
What happens is that when the help activates, where I'm typing loses focus and I need to click back into the editor or console window to continue typing. The only way to write code in the editor without constantly being interrupted is to disable the help connection, which is annoying because thats one of my favourite parts of spyder.

Versions and main components

  • Spyder Version: 3.0.0b4
  • Python Version:3.5.2
  • Operating system: Mac OSX 10.11.5

Dependencies

jedi >=0.8.1 : 0.9.0 (OK)
matplotlib >=1.0 : 1.5.1 (OK)
nbconvert >=4.0 : 4.2.0 (OK)
numpy >=1.7 : 1.11.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 4.3.0 (OK)
pyflakes >=0.6.0 : 1.2.3 (OK)
pygments >=2.0 : 2.1.3 (OK)
qtconsole >=4.2.0: 4.2.1 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.4.1 (OK)
sympy >=0.7.3 : 1.0 (OK)

@ccordoba12
Copy link
Member

We need to give focus to the Help pane to show it in case it's not visible at the moment of asking for the docs of an object.

But we could improve the logic of how this is done to not do it every time a request is sent to Help ;-)

@goanpeca
Copy link
Member

Or we should just give the focus back to the editor (in the cases where the help pane was indeed "hidden") ?

@Keou0007
Copy link
Contributor Author

Needing to give focus makes sense, but it is obstructive to typing when it happens at every open bracket. This isn't the behaviour I get on the Windows version, so there must be something different about the Mac.

The solution could either be to send the focus back and make sure it happens fast enough that is doesn't cause lost keystrokes.

Or, don't change the focus and just have the help update in the background. If a user has the help panel not visible, they can manually shift focus if they need to read it, which is much better than interrupting coding when they don't need it.

@thierryBottaro
Copy link

thierryBottaro commented Aug 17, 2016

The problem is worst than that : when I type into the help (let's say 'percentile') I can't go further than "p" because the focus is on the Help pane showing "No further documentation available" instead of letting me typing the rest.

The problem seems to be new with the beta3 or 4 or with the QT5-
in Winpython 3.4.4.1 (not QT5), the HELP pane behave as expected. Winpython 3.4.4.1 is using Spyder3 beta2 according to their changelog ( winpython/winpython#217 ).

I don't agree on "we need to give focus". If one would need to see the Help, he would search for the pane. Changing the focus and forcing the pane to be visible just slow down everything for a function which (imho) is meant to work in background.

On contrary to Keou0007, I reproduced it on Win7. (but in Spyder beta4 not in beta2)

I would not mark this as issue "enhancement" because this focus behaviour make the HELP pane completely useless.

@wtheis
Copy link

wtheis commented Oct 5, 2016

With the current behavior it is impossible to work with help connected to editor and/or console.

I don't think there is any reason to give focus to the help pane when help is updated in the background as you type.

I would expect the focus to move to the help pane only for the cases when help is called explicitly via ctrl-I.

@ccordoba12 ccordoba12 modified the milestones: v3.0.1, v3.1 Oct 5, 2016
@ccordoba12
Copy link
Member

Yes, we also think this is a bug.

@ccordoba12 ccordoba12 modified the milestone: v3.0.1 Oct 6, 2016
@thierryBottaro
Copy link

Thank you for marking this as a bug. (I would still remove the "Type-Enhancement" label)
I tested the last WinPython version "3.4.4.4Qt5" with Spyder 3.0.0beta 5 in it : it works like a charm :)

I agree with wtheis :

I would expect the focus to move to the help pane only for the cases when help is called explicitly via ctrl-I.

@green-slowmoe
Copy link

though this is an ancient issue, I do observe this behavior (console looses focus after opening parenthesis) for at least a year myself. am I the only one?

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

No branches or pull requests

6 participants