Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27468 closed defect (bug) (fixed)

tabindex attribute causes element not to be clickable in new TinyMCE

Reported by: wpdavis's profile wpdavis Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords:
Focuses: Cc:

Description

In the new TinyMCE, the tabindex attribute (and possibly others, but only been able to definitely identify tabindex) will cause the text inside the element to be unclickable.

To reproduce:

  • Copy text that contains a span, div or p tag with the tabindex attribute set
  • Paste that into the new text editor
  • Try and click into the middle of the text inside the element with the tabindex set. It will not let you. All other text remains clickable.

As a real-world example, Gmail wraps dates and times that can be added quickly to the calendar with the tabindex attribute. If you're viewing this in Gmail and the date January 1 is underlined, this is some good text to reproduce this bug with. Other situations have cropped up as well, copying and pasting from email and from QuickOffice.

Attachments (1)

27468.diff (2.9 KB) - added by jesin 10 years ago.
Strip out the tabindex attribute

Download all attachments as: .zip

Change History (7)

#1 @azaozz
10 years ago

Confirmed. Happens only in Chrome/Safari, Firefox and IE work as expected. Passing upstream.

#2 @nacin
10 years ago

  • Milestone changed from Awaiting Review to 3.9

@jesin
10 years ago

Strip out the tabindex attribute

#3 follow-up: @jesin
10 years ago

Should the tabindex attribute be preserved?

#4 in reply to: ↑ 3 @azaozz
10 years ago

Replying to jesin:

There are two things wrong with 27468.diff:

  • It patches an external library. If changes to tinymce.js are needed, they should be submitted to the TinyMCE project.
  • It "forbids" the use of the tabindex attribute. It will be stripped from the user's html. There may not be many user cases where tabindex can/should be used but the editor should not remove it.

This was patched upstream and will be in the next TinyMCE update: https://github.com/tinymce/tinymce/commit/3c5608d39e1d0be1e2adef8d045b604694710900

#5 @nacin
10 years ago

Keeping this ticket open to make sure we upgrade to 4.0.21. It would be best if we were able to ship that with RC next week, perhaps worth talking to Spocke about our hopeful timeline.

#6 @azaozz
10 years ago

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

Fixed in [27897] by updating to 4.0.21.

Note: See TracTickets for help on using tickets.