U4-3467 - CTRL-s does not work in the multiple editors

Created by Søren Reinke 08 Nov 2013, 21:17:28 Updated by Søren Reinke 21 Nov 2013, 12:45:39

In V7 RC from Nuget.

I have found that CTRL+s does not work in the following editors: Templates Partial Views Document Types Media Types

Comments

Per Ploug 11 Nov 2013, 11:00:44

Cant replicate, what browser?


Søren Reinke 11 Nov 2013, 12:23:33

Hi Per

It's on Windows 7 Ultimate 64 bit, using Chrome Version 31.0.1650.48 beta-m

I retested with a brand new Nuget install. And they are not saved.

But saving 'content' with ctrl+s does work.


Per Ploug 13 Nov 2013, 13:27:31

Still cant replicate, it works in all of these editors on my machine, but not running from nuget tho, tried running off a nightly build from nightly.umbraco.org ?


Søren Reinke 13 Nov 2013, 14:38:15

Downloaded UmbracoCms.7.0.0-build.157.zip

Installed an empty site template from webmatrix, deleted everything in the webmatrix created folder, and extracted the nightly zip file.

Now i use Chrome 32.0.1700.6 beta-m Aura the problem is still there.

But ctrl+s does work in 'scripts'

Anything i can do to help debug the problem? Maybe build umbraco from source, and debug it? (please provide hints about what files to watch).

p.s. Could you make the nightly builds as Visual Studio solutions? Prefer to use VS instead of webmatrix :)


Stuart Burrows 14 Nov 2013, 18:14:01

I'm get this same issue except that if I hit ctrl then s it saves.

Worse it hijacks the s key intermittently so that I save a lot of files with no s's in them!

I'll be investigating this further in my spare time - will report back if I find anything. Hints on which files to focus on would definitely be helpful :)


Niels Kristiansen 14 Nov 2013, 23:26:33

I also get some of the same issue on the Mac + Chrome 31.0.1650.57, when I use the "Partial Views" and "Templates" under "Settings". But here, if I write some text in the editor and use the letter s or S, it will save the document and the s or S will not be written in the editor window. It only happend the first time I make a new template - after a update the editor works again - everything is okay. Maybe my issue has something to do with a copy/paste of some code into the editor, before editing the code in Umbraco.


Marc Goodson 16 Nov 2013, 01:47:21

I'm experiencing the same issue as Stuart, above in Templates and Partial Views, ie I'm typing happily along, then suddenly every s fires a save, I've taken to finding an existing s, and copying it to clipboard, to paste when I need an s, weird thing is once, I've done that once, pressing s again goes back to normal. Chrome Version 30.0.1599.101 Not sure what kicks it off, but maybe it is cut and paste related


Per Ploug 20 Nov 2013, 07:54:28

Marc - is this an issue in the latest nightly as well? cant seem to replicate here anymore, (modifed this last week)


Søren Reinke 20 Nov 2013, 09:03:16

Per i just tried in latest nightly build 174 and ctrl+s stills fails in the listed editors both in IE10 and Chrome Version 32.0.1700.19 beta-m Aura, Safari 5.1.7 fails as well.

By the way when creating a new template it does not update the three, have to reload nodes to see it. In partial views it does update.


Per Ploug 20 Nov 2013, 09:13:12

Finally found the reason for this, so deep inside the codemirror editor, it actually assigns various hotkeys including ctrl+s which on windows specifically doesnt emit it outside of the editor - on osx it works fine since it handles cmd+s differently.

This is the same case, as with tinyMCE, the editing component traps the hotkeys, with no standard way of emitting them outside the editor.

CodeMirror is going to be replaced with either ACE or the new VS online editor, in one of the first maintance releases, so this issue will have to wait untill then


Sam Stein 20 Nov 2013, 09:33:44

I'm not sure I understand this.. there's CodeMirror in v6 as well, why does it work fine there?

Also, IMHO replacing an editor is not just something you should do in a maintenance release, it should be optional until most bugs with it are fixed. I suffered enough with the Codepress to CodeMirror switch, I don't want to go through that again.


Per Ploug 20 Nov 2013, 09:38:30

well, maintance release is probably not the right term then... replacing codemirror has nothing to do with the hotkey issue tho, its been planned for a while since codemirror in general is not very stable.

Also, as you might have noticed, the template editor is a legacy editor running inside an iframe, these are gradually phased out, so no matter what we will need to redo these editor components since they are tied pretty heavily into webforms


Sam Stein 20 Nov 2013, 09:43:46

Hence me being scared about replacing it with yet another possibly buggy editor. I can see how it would cause much less problem when not all the old webforms JS is interfering with the editor. Heck, even CoderMirror could probably just work if it was not in the iframe.

Anyway, got it, so CTRL+S is not working because it needs to jump out of CM, then out of the iframe. Oh well, just another one of those CM quirks to get used to I guess.


Marc Goodson 20 Nov 2013, 10:21:16

Yes, the pain isn't that CTRL-S isn't working (for me) in fact it is working, too much, if I press ctrl-s it triggers save, the problem is that sometimes 'for some reason' just typing the letter s, with no ctrl depressed will fire the save, so where I typed 'depressed' there, it would have saved twice, and only 'depreed would have appeared on the screen:-), cutting and pasting an s from elsewhere seems to turn off the funkyness for a while, it is weird but yes sure it's editor related rather than something we can particularly control. Just remember to turn down any Mississipi related sites on 7, until the new editor is plumbed in. I'll grab the latest nightly later today, I'd like to work out what definitely triggers the no s weirdness, I'm referring to this phenomena as 'S Bug 7' in deference to the late nineties british disposable pop group s club 7... if that helps.


Per Ploug 20 Nov 2013, 15:14:05

think the S bug 7 has been solved, atleast the editor now saves, and wont hijack your S key anymore, this should also work inside codemirror and on the all the legacy editors.


Marc Goodson 21 Nov 2013, 00:53:56

Yep not experiencing the S bug 7 with the UmbracoCms.7.0.0-build.176.zip !! thanks, it was driving me nuts or rather nut


Søren Reinke 21 Nov 2013, 12:45:39

I can also confirm that ctrl+s works at least in templates in the just released V7 :)

Thanks Per for the help, the missing ctrl+s was driving me more crazy than i already am :)


Priority: Normal

Type: Bug

State: Fixed

Assignee: Per Ploug

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version: 7.0.0

Sprint:

Story Points:

Cycle: