WordPress.org

Make WordPress Core

Opened 22 months ago

Closed 18 months ago

Last modified 18 months ago

#21197 closed defect (bug) (fixed)

There are two diffrent full screen editors

Reported by: janw.oostendorp Owned by: azaozz
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.4.1
Component: TinyMCE Keywords:
Focuses: Cc:

Description

In the WP editor there is a full screen button. It has shortcut ALT+SHIFT+G. When the button is pressed it shows a different full screen editor then when the shortcut is used.

I tried this on multiple 3.4.1 installations, one of them had no plugins to interfere.

I'm not sure if this is a bug, maybe it is intended.
If so can someone explain why?

Attachments (1)

21197.patch (1.1 KB) - added by SergeyBiryukov 18 months ago.

Download all attachments as: .zip

Change History (27)

comment:1 helenyhou22 months ago

Confirmed. Looks like alt+shift+g brings up the TinyMCE fullscreen editor instead of the WordPress fullscreen (distraction-free) editor - not sure what the right command is to bind to that key combo instead, if there is one, or else I'd try patching it :)

comment:2 SergeyBiryukov22 months ago

I think I've found a related bug:

  1. Press Alt + Shift + G.
  2. In the opened window, press "Toggle fullscreen mode" button. Nothing happens.
  3. Press Alt + Shift + G once again. The DFW editor shows up.
  4. "Exit fullscreen" link doesn't work. There's an error message in JS console:
Error: edd is undefined
Source File: wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js?ver=3541-21229
Line: 31
Last edited 22 months ago by SergeyBiryukov (previous) (diff)

comment:3 janw.oostendorp22 months ago

@Sergey I also saw that but first I wanted to make sure it was a bug

comment:4 azaozz22 months ago

Currently there are several problems with the shortcuts in the editors. One is that Firefox uses Alt + Shift + letter for the accesskey HTML attribute and it's no longer possible to overwrite/prevent that default. Another is that in the latest version TinyMCE has different/new API for handling key strokes (still working out few bugs there).

Thinking it would be best to redo all custom shortcuts we add in TinyMCE avoiding all browser limitations even if they would be different for different browsers (the shortcuts are already different for MacOS and Windows).

comment:6 azaozz22 months ago

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

In [21266]:

TinyMCE: update the keyboard shortcuts: Alt + letter for Firefox and WebKit, Alt + Shift + letter for IE and Opera, add shortcut for DFW (Alt + W), see #21214, fixes #21197, fixes #17992

comment:7 azaozz22 months ago

  • Component changed from Editor to TinyMCE
  • Milestone changed from Awaiting Review to 3.5

comment:8 SergeyBiryukov21 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:2 is still an issue.

Tested in Firefox 13, Chrome 20, IE 8, Opera 12. In Opera, a blank window with a scrollbar appears in step 3 instead of the DFW editor.

comment:9 azaozz21 months ago

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

In [21272]:

TinyMCE: add the Alt + W shortcut only when DFW is loaded and Alt + G only when MCE fullscreen is loaded, fixes #21197

comment:10 azaozz21 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

In some languages Alt + letter is used regularly to type characters like ç (Alt+C), ł (Alt+l), ż (Alt+z), etc.

In that terms I'm not sure what shortcuts can be used for the editor buttons. Alt + Shift + letter works in Chrome, IE and Opera but doesn't work in Firefox (it triggers the "accesskey" attributes regardless of whether the element is visible or not).

The only key combination left is Ctrl + Alt + letter (Command + Option + letter on Mac), however that may run into keystroke conflicts too.

comment:11 azaozz21 months ago

For now thinking we should revert to Alt + Shift + letter for Chrome and use Ctrl + Alt + letter (Command + Option + letter) in Firefox for the custom editor shortcuts.

In the long term perhaps we can use the "Keyboard Shortcuts" checkbox in the user profile to turn on/off the shortcuts not only for moderating comments but also for the editor and any other place we may use them as well.

Edit: opened #21414 for that.

Last edited 21 months ago by azaozz (previous) (diff)

comment:12 azaozz21 months ago

In [21359]:

TinyMCE shortcuts: revert to Alt + Shift + letter for WebKit and Ctrl + Alt + letter (Command + Option + letter) in Firefox, see #21197

comment:13 azaozz21 months ago

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

In [21415]:

TinyMCE: revert Firefox shortcuts to match all other browsers (Alt+Shift+letter), fix the labels for the shortcuts, update description in wp-mce-help, fixes #21197

comment:14 miqrogroove19 months ago

#21933 was marked as a duplicate.

comment:15 follow-up: SergeyBiryukov19 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

TinyMCE help still lists Alt + Shift + G shortcut for non-DFW fullscreen mode:
http://core.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/wp-mce-help.php?rev=21545#L216

However, unless 'wpfullscreen' plugin is manually disabled via tiny_mce_before_init filter, the shortcut is not registered (since [21272]).

Perhaps the shortcut should still work if 'wpfullscreen' is loaded but not active at the moment. Or should just be removed from help.

comment:16 in reply to: ↑ 15 azaozz19 months ago

Replying to SergeyBiryukov:

Think best would be to remove the TinyMCE's fullscreen from the default config. Opened #21976 for that.

comment:17 miqrogroove19 months ago

Something missing from the discussion so far is the "fullscreen" button in the HTML tab. That button opens DFW. So if a button is being removed from TinyMCE it might make sense to remove it in both places. Or were you fixing the existing button(s)?

comment:18 navjotjsingh19 months ago

  • Cc navjotjsingh@… added

comment:19 follow-up: helenyhou18 months ago

What's left to do here? I see #21976 for removing the TinyMCE fullscreen plugin. Anything else?

SergeyBiryukov18 months ago

comment:20 in reply to: ↑ 19 SergeyBiryukov18 months ago

Replying to miqrogroove:

Something missing from the discussion so far is the "fullscreen" button in the HTML tab. That button opens DFW. So if a button is being removed from TinyMCE it might make sense to remove it in both places. Or were you fixing the existing button(s)?

The button on the Visual tab also opens DFW. What's being removed here is TinyMCE's fullscreen plugin (which has "Alt + Shift + G" shortcut), not the DFW button.

Replying to helenyhou:

What's left to do here?

21197.patch replaces TinyMCE's fullscreen shortcut in the help window with the one for DFW.

Last edited 18 months ago by SergeyBiryukov (previous) (diff)

comment:21 miqrogroove18 months ago

Is it possible to hook up Alt + Shift + G for DFW? That would make a lot more sense to me than removing it. That was how I found DFW in the first place, along with its many related keyboard shortcuts.

comment:22 SergeyBiryukov18 months ago

DFW has its own shortcut, Alt + Shift + W.

comment:23 miqrogroove18 months ago

Alt + Shift + W does not work, version 3.4.2. Is it a trunk only feature?

comment:24 SergeyBiryukov18 months ago

Yes, added as Alt + W in [21266], changed to Alt + Shift + W in [21415].

comment:25 azaozz18 months ago

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

This has been fixed by [21266] and [21415].

comment:26 azaozz18 months ago

In 22394:

Remove the Alt + Shift + G (old fullscreen mode) shortcut from the TinyMCE help popup, props SergeyBiryukov, see #21197

Note: See TracTickets for help on using tickets.