U4-9379 - Change Unpublish Keyboard Shortcut from CTRL + U and/or force confirmation before executing the action

Created by Simon Dingley 13 Jan 2017, 13:21:23 Updated by Sebastiaan Janssen 28 Jun 2018, 17:29:11

Tags: Up For Grabs PR

Relates to: U4-9383

Relates to: U4-5293

Relates to: U4-6989

Relates to: U4-7941

The keyboard shortcut for Unpublish is the same as view-source (in Chrome at least) and it's pretty dangerous. On occasions, I have unpublished entire sites accidentally because of this due to the fact that is no confirmation of the action it just goes right ahead and unpublishes the content and all of its child nodes!

This is not a massive problem on small sites as you can quickly republish the site but I just accidentally did this on a very large load balanced site and the impact was huge and the time to get the site back online was significant due to the number of nodes that had to be republished.


Steve Morgan 13 Jan 2017, 14:32:17

I have a client who's done this - they were very confused and concerned.

At least I know why now :)

Rasmus Thyssen 16 Jan 2017, 08:33:44

I've tried this as well. Not funny. CTRL + U is a shortcut i use often as a frontend developer.

Mark Owen 15 Feb 2017, 12:52:48

Whilst a change to the keyboard shortcut would probably be a good idea, there is always a chance of a collision with shortcuts people use.

Should this issue actually be making unpublish an action that requires confirmation? Especially if using the shortcut which you could easily use accidentally.

Jim Gettrup 15 Feb 2017, 13:02:49

I vote for a confirmation dialog very similar to the one shown when deleting a content item, see issue U4-7941.

Owen Blacker 18 Aug 2017, 14:35:32

I think a confirmation dialog for unpublish actions makes sense. But I'm not sure it even merits a keyboard shortcut in the first place — surely it's an infrequent ''deliberate'' action and a more-frequent ''accidental'' action?

I'd suggest both adding a {{confirm()}} prompt and removing the shortcut altogether.

Nathan Woulfe 27 Jun 2018, 00:40:39

I've done this previously with an http interceptor and a confirm() dialog - happy to port it across to a PR if this is still useful.

Sebastiaan Janssen 27 Jun 2018, 06:51:47

@NathanWoulfe Sounds good to me, go for it! :-)

Nathan Woulfe 28 Jun 2018, 00:41:15

@sebastiaan - https://github.com/umbraco/Umbraco-CMS/pull/2731. Kept the CTRL+U shortcut, but added a confirmation step to avoid accidental unpublishing

Priority: Major

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions:

Due in version: 7.12.0


Story Points: