Foswiki on GitHub is open for business! Next release meeting: Monday September 15, 1300Z

Item10288: Saving in fullscreen mode (via shortcut key) loses changes

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Extension TinyMCEPlugin PaulHarvey
Saving while in fullscreen mode will lose changes.

There is no Save button in the fullscreen mode, but the standard keyboard shortcut Shift+Alt+S still performs a save operation. However, all changes made since entering fullscreen mode are lost.

To repeat:
  1. Start editing a topic using the wysiwyg editor
  2. Make some changes
  3. Enter fullscreen mode
  4. Make more changes
  5. Press Shift+Alt+S

As a result, the first set of changes will be saved, but the second set of changes are lost.

I am just guessing here as I am not familiar with the internals of the plugin, but maybe the keyboard shortcut is caught by the non-fullscreen editor that might be waiting "behind" the fullscreen editor.

Related: Item2285

TinyMCEPlugin version: 1.1.7 (04 Nov 2010)

-- JeffSebastian - 26 Jan 2011

Ouch; confirmed.

-- PaulHarvey - 26 Jan 2011

It seems that Item2037 (which is already solved) is related. The problem there was caused by that the TMCE plugin creates a new TMCE editor instance when switching to fullscreen. Maybe the solution that was applied there contains something that could help here?

-- JeffSebastian - 08 Aug 2011

I got hit by this in the latest release. As this is a data loss bug, shouldn't it be urgent?

-- DamianSmall - 06 Oct 2011

I have a fix - in the TMCE fullscreen plugin, when entering fullscreen, clear the accesskey attributes for save, quietsave and checkpoint. And when exiting fullscreen, restore them. Seem to work for me. Is this acceptable, or do we need to figure out how to actually have the accesskey intercept the alt-shift-s and exit fullscreen prior to save.

-- GeorgeClark - 20 Nov 2011

Revised fix to avoid modifying moxicode. Used JQuery to intercept and refuse the save when in fullscreen. This is better anyway as the user gets an alert rather than finding the accesskey missing.

-- GeorgeClark - 22 Nov 2011

I've made the selectors a little more tolerant to non-standard edit templates, including NatEditPlugin's edit templates. Just needs elements with ids #save and #cancel

In doing so I've created a dependency on jQuery 1.4+ features, so I modified DEPENDENCIES accordingly.

-- PaulHarvey - 25 Nov 2011

I briefly had a look at getting the shortcut keys to work directly, rather than just blocking from fullscreen. A solution similar to the old HTML2TML-from-fullscreen bug, seems canceling the submit event, un-fullscreening and then re-submitting the form seems like a deeper fix than I want to do right now, but we should definitely do that eventually

-- PaulHarvey - 25 Nov 2011

Re-opened because the fullscreen hack was trying to run even when TMCE wasn't, causing JS error.

-- PaulHarvey - 29 Nov 2011
 
git c
Topic revision: r26 - 17 Dec 2011, GeorgeClark
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License