cmd-f find box text is shared between applications

I am struggling with some behavior on my mac. When I use Cmd-F (or try to use find from application menus), the text being searched for seems to be global to all applications.


For example, I have the find box open for textEdit, iTerm2, and Firefox. If I type the text "blah" in the textEdit app, the "blah" text is also copied to my open find boxes in iTerm2 and Firefox in different spaces, overwriting different text that I was searching for in those applications.


Is this behavior intentional? It seems like a bug to me. How can I make it so that I can search for *different* text in different applications at the same time? Visual Studio Code doesn't seem to use the same find system and is not affected the same way.


Also, is this a security concern for the OS that applications could "see" what my Cmd-F searches are in other applications?


I am running macOS Big Sur 11.2.1.

MacBook Pro 15″, macOS 11.2

Posted on Mar 26, 2021 8:24 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 27, 2021 6:48 AM

The Finder is comprised of several pasteboards and by default, all of our normal copy/paste operations use pasteboard general. However, there is also a Find pasteboard, and when you use the Edit menu > Find > Use Selection for Find, it writes that text to the Find pasteboard. The last content placed on the Find pasteboard behaves just like the last content placed on the General pasteboard and remains until overwritten.


Since each Cocoa-based application has this Edit menu > Find functionality, it cannot differentiate which application placed the content on the Find pasteboard, and when you launch the specific application's Find utility, it queries the Find pasteboard and retrieves the content found there because it could have been placed there by that application's own Use Selection for Find. This is not a bug.


To avoid using this common Find pasteboard across multiple open applications, select the text that you wish to find in the specific application, copy it to the regular pasteboard, and then paste that text into that application's Find window. This avoids the Find pasteboard, though it replaces whatever was on the general pasteboard.


The Terminal allows one to copy and paste to and from the Find area of the clipboard, but these must specifically request it:


pbcopy -pboard find <<<"dogcow"
pbpaste -pboard find
"dogcow"



To clear the Find pasteboard and break the chain of each application using the last contents copied there, perform this Terminal command:


pbcopy -pboard find <<<""



Similar questions

2 replies
Question marked as Top-ranking reply

Mar 27, 2021 6:48 AM in response to _blaine_

The Finder is comprised of several pasteboards and by default, all of our normal copy/paste operations use pasteboard general. However, there is also a Find pasteboard, and when you use the Edit menu > Find > Use Selection for Find, it writes that text to the Find pasteboard. The last content placed on the Find pasteboard behaves just like the last content placed on the General pasteboard and remains until overwritten.


Since each Cocoa-based application has this Edit menu > Find functionality, it cannot differentiate which application placed the content on the Find pasteboard, and when you launch the specific application's Find utility, it queries the Find pasteboard and retrieves the content found there because it could have been placed there by that application's own Use Selection for Find. This is not a bug.


To avoid using this common Find pasteboard across multiple open applications, select the text that you wish to find in the specific application, copy it to the regular pasteboard, and then paste that text into that application's Find window. This avoids the Find pasteboard, though it replaces whatever was on the general pasteboard.


The Terminal allows one to copy and paste to and from the Find area of the clipboard, but these must specifically request it:


pbcopy -pboard find <<<"dogcow"
pbpaste -pboard find
"dogcow"



To clear the Find pasteboard and break the chain of each application using the last contents copied there, perform this Terminal command:


pbcopy -pboard find <<<""



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

cmd-f find box text is shared between applications

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.