Skip to:
Content

Opened 21 months ago

Closed 16 months ago

Last modified 16 months ago

#1917 closed defect (fixed)

tabindex issue on new topic form

Reported by: jaredatch Owned by: ethitter
Milestone: 2.3 Priority: low
Severity: normal Version: 2.1
Component: Theme Compatability Keywords: has-patch
Cc: stephen@…, wordpress@…, erick@…

Description

Thought there was a ticket open for this already, but I can't find it.

When on the new topic form, tabbing will jump from the title to the tags, skipping over the body. It's not a show stopper but definitely annoying.

I've done some investigating but haven't figured out why this is happening. Everything works fine in the admin and tinymce on the front end is loading the same TinyMCE plugins (including the one for tabindex support) as the backend - so it *should* be working. But it isn't.

Attachments (3)

1917.patch (2.8 KB) - added by ethitter 16 months ago.
1917.2.patch (4.4 KB) - added by johnjamesjacoby 16 months ago.
Removes extra theme compat helper JS
1917.3.patch (1.8 KB) - added by ethitter 16 months ago.
Handling tabbing out of the Visual Editor

Download all attachments as: .zip

Change History (25)

comment:1 johnjamesjacoby21 months ago

Oddly enough, this works if the HTML tab is selected, but not Visual. More than likely it's due to the iframe, but WordPress core pulls it off in wp-admin, presumably with some additional JS somewhere.

Possibly related: #WP20834

comment:2 johnjamesjacoby21 months ago

  • Milestone changed from Awaiting Review to 2.2

comment:3 netweb21 months ago

  • Cc stephen@… added

I think this is the ticket your referring to:

http://bbpress.trac.wordpress.org/ticket/1407 'Tabindex attribute causing issues'

comment:4 MZAWeb17 months ago

  • Cc wordpress@… added

comment:5 johnjamesjacoby17 months ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4513]) TinyMCE:

  • Fix tabbing from topic title.
  • Hat-tip MZAWeb.
  • Fixes #1917.

comment:6 MZAWeb17 months ago

  • Keywords needs-patch added
  • Resolution fixed deleted
  • Status changed from closed to reopened

We need to make sure jQuery is enqueued where this script is included.

comment:7 johnjamesjacoby17 months ago

  • Owner set to johnjamesjacoby
  • Status changed from reopened to new

comment:8 jaredatch16 months ago

The other part of the conversation was talking about loading order, which possibly could be an issue (jQuery in the footer and the script output in the header).

ethitter16 months ago

comment:9 follow-up: ethitter16 months ago

  • Cc erick@… added
  • Keywords has-patch added; needs-patch removed

When the full TinyMCE editor is used, wp_editor() enables the tab focus plugin. The same is not done for the teeny editor, which bbPress uses by default.

1917.patch turns on the tab focus plugin when bbp_get_the_content() calls wp_editor().

bbp_get_the_content() will also accept TinyMCE's tabfocus_elements argument now, passing it to the editor instance so one can be explicit about the tab order if needed.

johnjamesjacoby16 months ago

Removes extra theme compat helper JS

comment:11 in reply to: ↑ 9 ; follow-up: johnjamesjacoby16 months ago

Replying to ethitter:

Oddly enough, it still doesn't work without the additional theme-compat JS. Attached patch even tries to use explicit class names for the previous and next items, with no success. Thoughts?

comment:12 follow-up: MZAWeb16 months ago

After last dev chat, I'm doing a little patch to move the in-line JS to a .js file and enqueuing with jQuery as a dep.

Still needed, right?

comment:13 in reply to: ↑ 12 johnjamesjacoby16 months ago

Replying to MZAWeb:

After last dev chat, I'm doing a little patch to move the in-line JS to a .js file and enqueuing with jQuery as a dep.

Still needed, right?

Should not be, if I understand the purpose of tabfocus correctly. It's just that it's still not working. :)

comment:14 johnjamesjacoby16 months ago

(In [4576]) Iterate on #1917.

  • Remove fullscreen editor from teeny editor buttons.
  • Introduce tabfocus plugin, with some approximate values.
  • Props ethitter.
  • Note: theme-side tinymce tabfocus still not working as intended.

comment:15 follow-up: MZAWeb16 months ago

Does it not work when you get jQuery enqueued _before_ the inline script? Works for me...

comment:16 johnjamesjacoby16 months ago

(In [4577]) Do not use hashes in tabfocus_elements array values. See #1917.

comment:17 in reply to: ↑ 15 johnjamesjacoby16 months ago

Replying to MZAWeb:

Does it not work when you get jQuery enqueued _before_ the inline script? Works for me...

The above tabfocus_elements fixes tabbing out-of TinyMCE, but not tabbing into it. If you wanted to write up the JS to enqueue a small JS file if we're using the fancy editor, that includes part of what was reverted in r4576, plus the same for reverse tabbing from the topic-tags input area, should fix this completely.

comment:18 in reply to: ↑ 11 ; follow-up: ethitter16 months ago

Replying to johnjamesjacoby:

Replying to ethitter:

Oddly enough, it still doesn't work without the additional theme-compat JS. Attached patch even tries to use explicit class names for the previous and next items, with no success. Thoughts?

Interesting. I honestly didn't try it without the additional JS.

I can take another look this weekend if MZAWeb doesn't beat me to it.

comment:19 in reply to: ↑ 18 johnjamesjacoby16 months ago

  • Owner changed from johnjamesjacoby to ethitter

Replying to ethitter:

I can take another look this weekend if MZAWeb doesn't beat me to it.

MZAWeb is out until after holiday, so it's all yours.

comment:20 johnjamesjacoby16 months ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4632]) Allow tabbing into and out of TinyMCE. Fixes #1917.

ethitter16 months ago

Handling tabbing out of the Visual Editor

comment:21 follow-up: ethitter16 months ago

1917.3.patch uses TinyMCE's method for catching keypresses to handle tabbing out of the editor. Even with the changes from r4632, tabbing wasn't consistently working for me.

Trying to shift+tab from the Topic Tags back to the editor still doesn't work properly though. Rather than return to the editor, I end up back in the Topic Title field. But we're getting closer.

comment:22 in reply to: ↑ 21 ethitter16 months ago

Replying to ethitter:

Trying to shift+tab from the Topic Tags back to the editor still doesn't work properly though. Rather than return to the editor, I end up back in the Topic Title field. But we're getting closer.

Ignore me. I was testing with a checkout from the plugin repo, not the bbPress repo.

Note: See TracTickets for help on using tickets.