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

Editor: lose focus on editor during auto-save #2682

Closed
meremagee opened this issue Jan 22, 2016 · 6 comments · Fixed by #6162
Closed

Editor: lose focus on editor during auto-save #2682

meremagee opened this issue Jan 22, 2016 · 6 comments · Fixed by #6162
Assignees
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Type] Bug

Comments

@meremagee
Copy link
Contributor

If a meta box, like tags, is expanded, upon auto-save, focus on editor is lost and placed in side bar meta box instead.

Repro:

  • Write in post body/editor in a draft
  • expand tags/categories meta box
  • click into tags input to select
  • click back into editor
  • notice that tags/categories meta is still in selected state: https://cloudup.com/cM0lpaYLzwZ
  • type in body
  • allow for autosave to initiate and continue typing
  • notice that auto-save causes a loss of focus on editor
  • focus is returned to meta box

video: https://cloudup.com/cJDQmZ-nQ4q

@meremagee meremagee added [Type] Bug [Feature] Post/Page Editor The editor for editing posts and pages. labels Jan 22, 2016
@lancewillett
Copy link
Contributor

Tested to reproduce today, happy to say it's no longer happening. Using Mac-n-Chrome with a test site.

autosave

@meremagee
Copy link
Contributor Author

This has not yet been resolved. Notice that if you don't deliberately click away from the tag/category dropdown in the sidebar to escape focus on the input, it will still grab the input upon save:

https://cloudup.com/cxp2bBLk2PX

@meremagee meremagee reopened this May 2, 2016
@lancewillett lancewillett changed the title EDITOR: lose focus on editor during auto-save Editor: lose focus on editor during auto-save May 2, 2016
@marekhrabe
Copy link
Contributor

I did everything as in the video and I wasn't able to confirm on current master (06c8c74) and on Wordpress.com

Is it still happening?

@marekhrabe
Copy link
Contributor

I was finally able to reproduce the issue now. It works like that only in Firefox. Here is a gif:

firefox-tag-focus

My assumption is that auto-saving a post has nothing to do with that problem (at least not directly). The tag input just won't give up the focus and it will take it back on next component update. Either triggered by auto-save or just typing anything in other fields (strangely, typing in body worked correctly for me, but typing in the post title did the action @meremagee described)

@meremagee
Copy link
Contributor Author

Note that auto-save is what appears to re-focus my cursor on the meta boxes while I'm in the body of the post on FF: (video from today) https://cloudup.com/iy11W3camws

@nylen
Copy link
Contributor

nylen commented Jun 30, 2016

@meremagee this is fixed in our testing, would you mind re-checking to confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Type] Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants