WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30422 closed defect (bug) (fixed)

Visual Editor Shortcuts for Headings Don't Work in Safari 8.0 on OS X

Reported by: coffeemick Owned by:
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: TinyMCE Keywords: needs-patch
Focuses: javascript Cc:
PR Number:

Description

Environment:

  • WordPress.org: Stock install without any plugins.
  • Theme: Twenty Fourteen.
  • Browser: Safari 8.0 on OS X 10.10.1.

Steps to reproduce bug:

  • Create a new post and use visual editor.
  • While cursor is in text input field press CMD+2 to change styling to h2.

Expected behavior:

  • Styling changes to the theme's styling for h2.

Actual behavior:

  • Safari opens the second bookmark of your Favorites Bar.

Reason:

  • The first nine bookmarks on Safari's Favorites Bar have the shortcuts CMD+[1..9]

Change History (29)

#1 @coffeemick
5 years ago

  • Summary changed from Visual Editor Shortcut for Headings Don't Work in Safari 8.0 on OS X to Visual Editor Shortcuts for Headings Don't Work in Safari 8.0 on OS X

#2 @DrewAPicture
5 years ago

  • Component changed from General to TinyMCE
  • Focuses administration added

#3 follow-up: @iseulde
5 years ago

  • Keywords reporter-feedback close added

Can't reproduce with Safari 8.0.2 on OS X 10.10.1 and Favorites Bar shown. Can you confirm this is still happening with Safari 8.0.2? If so, can you give more steps to reproduce?

#4 @iseulde
5 years ago

  • Focuses javascript added; administration removed

#5 @iseulde
5 years ago

#31176 was marked as a duplicate.

#6 in reply to: ↑ 3 @Denis-de-Bernardy
5 years ago

  • Keywords reporter-feedback close removed

Replying to iseulde:

Can't reproduce with Safari 8.0.2 on OS X 10.10.1 and Favorites Bar shown. Can you confirm this is still happening with Safari 8.0.2? If so, can you give more steps to reproduce?

It happens much like OP and I describe (see #31176 for a screenshot), with OS X 10.10.2 and Safari 8.0.3.

You need to have bookmarks in the Favorites Bar (as in outside of folders) for the problem to appear. (Though in my case, moving those bookmarks in folders and subsequently rebooting the Mac had no effect either, so it's possibly enough to have bookmarks in the Favorites Bar to begin with.)

#7 follow-up: @iseulde
5 years ago

  • Milestone changed from Awaiting Review to 4.2

This will be fixed when we update TinyMCE. The new shortcuts will be cmd+shift+[1-6].

#8 @iseulde
5 years ago

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

Fixed in [31700], see #31551.

#9 follow-up: @iseulde
5 years ago

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

Reopening because we need to update the help modal. We can do this with #29558.
Probably better to restructure the modal a bit and do this with JS instead of an iframe. We should have all the strings and we can check the environment.

#10 in reply to: ↑ 7 @helen
5 years ago

Replying to iseulde:

This will be fixed when we update TinyMCE. The new shortcuts will be cmd+shift+[1-6].

I know it's because of TinyMCE, but this is terrible on OSX - cmd+shift+3 and 4 are screenshot shortcuts, and if you use CloudApp, so are 5 and 6.

#11 @iseulde
5 years ago

You're right, this is bad. Probably better to use the same as accesskey for non standard shortcuts. I'll ping them.

#12 @iseulde
5 years ago

Done.

#13 @coffeemick
5 years ago

Retracted. See ticket:30422#comment:16 for a in-depths explanation of useful shortcuts on Safari/OS X.

Last edited 5 years ago by coffeemick (previous) (diff)

#14 @iseulde
5 years ago

ctrl+alt?

#15 @iseulde
5 years ago

access = ctrl+alt on mac, shift+alt on windows.

#16 @coffeemick
5 years ago

Apparently the only available 1-6 shortcuts in Safari (8.0 on OS X 10.10) are ctrl+[1-6] and cmd+alt+shift+[1-6].

The following shortcuts are already used:

Safari OS X
cmd+[1-9] = First nine bookmarks in Favorites Bar
cmd+alt+1 = Show Top Sites (apparently also cmd+alt+ctrl+1 on my MacBook Air)
cmd+alt+2 = Show History (apparently also cmd+alt+ctrl+2 on my MacBook Air)
cmd+ctrl+1 = Show Bookmarks Sidebar
cmd+ctrl+2 = Show Reading List Sidebar
cmd+ctrl+3 = Show Shared Links Sidebar

OS X Systemwide
cmd+shift+3 = Capture the screen to a file
cmd+shift+ctrl+3 = Capture the screen to the Clipboard
cmd+shift+4 = Capture a selection of the screen to a file
cmd+shift+ctrl+4 = Capture a selection of the screen to the Clipboard

For OS X shortcuts see https://support.apple.com/en-us/HT201236

#17 follow-up: @iseulde
5 years ago

ctrl+alt is not used afaik. It should be reserved for these kind of things.

#18 in reply to: ↑ 17 @coffeemick
5 years ago

Replying to iseulde:

ctrl+alt is not used afaik. It should be reserved for these kind of things.

On a German keyboard

ctrl+alt+1 produces ¡ (inverted exclamation mark http://unicode-table.com/en/00A1/)
ctrl+alt+2 produces (left double quotation mark http://unicode-table.com/en/201C/)

when using the WordPress editor or any other textual input environment on OS X.

Last edited 5 years ago by coffeemick (previous) (diff)

#19 in reply to: ↑ 9 @helen
5 years ago

Replying to iseulde:

Reopening because we need to update the help modal. We can do this with #29558.
Probably better to restructure the modal a bit and do this with JS instead of an iframe. We should have all the strings and we can check the environment.

Related: #24795

#20 follow-up: @iseulde
5 years ago

What happens if you use ctrl+alt+1 after focussing this textarea?
Just paste this in the address bar: data:text/html, <a href="http://google.com" accesskey="1">link</a><textarea>.

#21 in reply to: ↑ 20 @coffeemick
5 years ago

Replying to iseulde:

What happens if you use ctrl+alt+1 after focussing this textarea?
Just paste this in the address bar: data:text/html, <a href="http://google.com" accesskey="1">link</a><textarea>.

Google.com is loaded.

#22 follow-up: @iseulde
5 years ago

@coffeemick On your German keyboard? Then it should be okay to use these?

#23 in reply to: ↑ 22 ; follow-up: @coffeemick
5 years ago

Replying to iseulde:

@coffeemick On your German keyboard?

Yes.

Then it should be okay to use these?

I'm not sure. It seems ctrl+alt+[1-4] produces the same characters as alt+[1-4]. alt+[1-4] are most likely the canonical key combinations you have to use to produce those characters. So ctrl+alt+[1-4] should be fine.

alt+[5-6] produces [ and ] respectively (as correctly expected). ctrl+alt+[5-6] produce invisible characters having zero width. When I press the cursor keys the cursor doesn't move visibly. E.g. if the cursor is left from the invisible character which is followed by x it takes 2x cursor right to get to the right of the x. I don't know what to make of it. According to the OS X built-in Keyboard Viewer alt+[1-6] and ctrl+alt+[1-6] should be identical.

In my opinion ctrl+alt+[1-6] on OS X is better than the current solution which obviously doesn't work.

#24 @samuelsidler
5 years ago

  • Priority changed from normal to high

This ticket was mentioned in Slack in #core by drew. View the logs.


5 years ago

#26 @iseulde
5 years ago

See #29558 for a patch.

#28 in reply to: ↑ 23 @azaozz
5 years ago

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

Replying to coffeemick:

I'm not sure. It seems ctrl+alt+[1-4] produces the same characters as alt+[1-4].

Yep, known "thing" on MacOS. The actual shortcut is alt+[1-4] but pressing another mod key doesn't prevent it, if the key combination is unassigned.

Can call this fixed in [32058], [32059], and [32060].

#29 @DrewAPicture
5 years ago

  • Priority changed from high to normal
Note: See TracTickets for help on using tickets.