42 Astoundingly Useful Scripts and Automations for the Macintosh

Safari 14 disables Automator Quick Actions in text fields

As of the September 17 release of Safari 14 for macOS Catalina, Automator can no longer replace text in text fields, such as in forums and blog comments. Here are some workarounds.

Jerry Stratton, September 26, 2020

Bug Alert

There appears to be a bug in Safari 14, released for macOS Catalina on September 17, that makes Automator Quick Actions fail. This was extremely annoying. In the morning, I was able to write in markdown on blog comments, and in the afternoon I was not.

What happens is that, if you select text in a text field in Safari and choose to run a Quick Action from the Services menu, the Quick Action runs—if it does anything outside of Safari, you’ll see those actions happen—but it replaces the text with nothing rather than with the output of the service.

You can undo to get your raw text back.

This will affect any of the simple BBCode and HTML verification/conversion scripts in 42 Astounding Scripts that are meant to be run in forum posts or blog comments.

I’m writing this in Brave, so as to be able to use markdown while writing this post. I’ve verified that Google Chrome also still works with Quick Actions. Another option would be to write it in a text editor, run the conversion, and then copy and paste it into Safari.

I’ve also used pbpaste and pbcopy as a stopgap, since most of my Quick Actions are command-line scripts.

  • pbpaste | moronify | pbcopy

will take whatever text I just copied, run it through the “moronify” script, and then copy it to the clipboard so that I can manually paste it back into the text field it came from.

You can test that Quick Actions are half-working in Safari with a simple two-step “Hello, World” Quick Action. In Automator, create a new Quick Action. Make the first step a “Run Shell Script” that pipes the selected text to a text file on the Desktop.

  • cat >> ~/Desktop/test\ services.txt

Make the second step a “Get Specified Text” that produces the text “HELLO WORLD”.

Hello World Service

A simple Quick Action in Automator to test Services in Safari.

Save it as “Hello, World”.

In any text editor or word processor, or an editable text field in any web browser other than Safari, selecting some text and running Hello, World from the Services menu will (a) write the selected text to the test file on the Desktop, and then (b) replace the selected text with “HELLO WORLD”. In Safari, it will write the text, but it will replace the selection with nothing.

I’ve reported this as a bug to Apple via their Safari feedback form. The problem may also be related to this behavior.

In response to 42 Astounding Scripts, Catalina edition: I’ve updated 42 Astounding Scripts for Catalina, and added “one more thing”.