WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6199 closed enhancement (wontfix)

TinyMCE fails to detect some Mac keyboard combos

Reported by: Denis-de-Bernardy Owned by:
Milestone: 2.6 Priority: lowest
Severity: trivial Version: 2.5
Component: TinyMCE Keywords: tinymce, mac
Focuses: Cc:

Description

This is a very minor niggle, but it would be nice if things worked as expected. :)

On a Mac, in Camino (i.e. Firefox lite) and Safari, if you select text using Shift + Command + Arrow (to select the entire line), the Add Link button doesn't turn on. I'm assuming the same for Firefox.

Things work fine when you use Shift + Arrow or Shift + Option + Arrow.

The Windows equivalent, for reference and testing purposes, would be Shift + Arrow and Shift + Control + Arrow respectively. Not sure about Linux.

Change History (9)

comment:1 mdawaffe6 years ago

  • Keywords tinymce added
  • Summary changed from add link button broken, sometimes to add link button broken in rich editor, sometimes

I noticed this problem in WP's TinyMCE today too when typing Command-a in FF3b4/Mac (to select all the text).

comment:2 azaozz6 years ago

Seems to be Mac specific behaviour. Using Shift + Arrow in Windows (FF, Safari, Opera) selects one character at a time, using Shift + Control + Arrow selects one word at a time, triple-clicking selects the whole paragraph and Ctrl + A selects all. In all cases the Link button activates. Passing on to TinyMCE's team.

comment:3 Denis-de-Bernardy6 years ago

  • Keywords mac added
  • Summary changed from add link button broken in rich editor, sometimes to On Mac boxes, Add link button in TinyMCE fails in a rare use-cases

Hopefully, someone over there will have a Mac. :D

Bumping this

comment:4 lloydbudd6 years ago

  • Component changed from Administration to TinyMCE
  • Summary changed from On Mac boxes, Add link button in TinyMCE fails in a rare use-cases to Mac, Add Link button in TinyMCE fails seldom

comment:5 pishmishy6 years ago

I can confirm this under FF3 in OS X. I don't know enough about my Mac or TinyMCE to fix this though.

comment:6 MattyRob6 years ago

  • Summary changed from Mac, Add Link button in TinyMCE fails seldom to TinyMCE fails to detect some Mac keyboard combos

I suspect that this is a bug in TinyMCE and not WordPress.

To reproduce:
Open a "Write Post" page
Enter some text into the document
Change the focus off the textarea
Select text using different methods:
Mouse + drag works
Ctrl+A works
Shift + arrow keys works

Command as a modifier key and arrows doesn't work, most likely because TinyMCE does not detect the modifier on Mac of pressing Command. I will confirm my suspicions by trying out TinyMCE directly on the Moxiecode site from my Mac later and close this ticket as wontfix and log it with TinyMCE if I'm right.

comment:7 MattyRob6 years ago

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

This affects TinyMCE outside of the WordPress environment (http://tinymce.moxiecode.com/example_full.php?example=true) so closing as invalid and opening a ticket (SourceForge ID 2014422)

comment:8 follow-up: MattyRob6 years ago

I've found a fix.. line 7974 in tiny_mce is:

if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.keyCode == 46 || e.keyCode == 8 || e.ctrlKey)

Change this to:

if ((e.keyCode >= 33 && e.keyCode <= 36) || (e.keyCode >= 37 && e.keyCode <= 40) || e.keyCode == 13 || e.keyCode == 45 || e.keyCode == 46 || e.keyCode == 8 || (tinymce.isMac && e.keyCode >= 91 && e.keyCode <= 93) || e.ctrlKey)

comment:9 in reply to: ↑ 8 azaozz6 years ago

Replying to MattyRob:

I've found a fix.. line 7974 in tiny_mce is:

Thanks, will pass it on to the TinyMCE's developers.

Note: See TracTickets for help on using tickets.