cms icon indicating copy to clipboard operation
cms copied to clipboard

[4.x]: ⌘S and ⇧⌘S shortcuts not working in Live Preview mode

Open lewisjenkins opened this issue 2 years ago • 5 comments

What happened?

Description

The ⌘S and ⇧⌘S shortcuts are no longer working while editing an entry in Live Preview mode in Craft 4. These were working in Craft 3. Tested in latest Safari and Chrome.

Steps to reproduce

  1. Edit an entry in Live Preview mode. Hit ⌘S while still in Live Preview.

Expected behavior

Should save the entry.

Actual behavior

Seems to activate the browsers native 'Save As...' found in the File menu.

Craft CMS version

Craft Pro 4.1.4.1

PHP version

8.1.3

Operating system and version

Linux 5.16.13-x86_64-linode153

Database type and version

MySQL 8.0.28

Image driver and version

Imagick 3.6.0 (ImageMagick 6.9.10-23)

Installed plugins and versions

Calendar 4.0.0-beta.6 Control Panel Body Classes 2.3.0 Control Panel Nav 4.0.3 Dumper 3.0.1 Imager X 4.1.2 LJ Range Slider 4.0.1 Navigation 2.0.3 Neo 3.1.8 Redactor 3.0.2 Timeloop 4.0.1

lewisjenkins avatar Jul 20 '22 21:07 lewisjenkins

Did you test Craft 3 to verify it works there? There’s no code in place for it and I just tested locally and it doesn’t work there either.

brandonkelly avatar Jul 25 '22 17:07 brandonkelly

Yes, it works in Craft 3. Literally just checked again to make sure I'm not going mad.

Edit an entry in Craft 3, choose Preview, make some changes while in preview mode and hit CMD-S, and the entry saves as expected. I feel like I've been using this workflow for years. It was the first thing I noticed that was missing when switching to Craft 4, and it still keeps tripping me up on a daily basis.

lewisjenkins avatar Jul 25 '22 20:07 lewisjenkins

Just double-checked and it’s definitely not working for me in Craft 3 either. Perhaps you have a plugin (e.g. CP JS) that is adding it?

It’s a little complicated because for the duration that you’re in Live Preview, the entry form is a little out of sorts, and saving directly from there could have some unexpected consequences. Which is why we haven’t added a Save button either (#9010).

We’ve started planning a rewrite of Live Preview based on the new element editor, though, so I’ll make sure we have native Command + S support at that point.

brandonkelly avatar Aug 12 '22 18:08 brandonkelly

I'm experiencing a similar issue when NOT using Live Preview on Craft 4.5.0, using Chrome.

The first ⌘S will work, but then the "Entry saved" notification never fades away or loses focus, and then the next ⌘S will invoke the 'Save As...' dialog.

Screenshot 2023-08-25 at 11 58 51 AM

jaymendoza avatar Aug 25 '23 17:08 jaymendoza

@jaymendoza That was fixed in 4.5.1 (see #13591).

brandonkelly avatar Aug 25 '23 17:08 brandonkelly