How is Linear controlling iOS edit menu in Safari

Hi from majr.app! We’re an app building a great experience on ProseMirror (open beta coming in June!)

We were wondering if anyone knows how Linear.app is achieving control of the iOS edit menu in Safari? See screenshot below. They are able to position the OS control consistently so they can predictably surface their own context menu. Appreciate any guidance or help if someone else has solved easily.

2 Likes

Also want to know the trick

Hey, Linear engineer here. We don’t have any specific code for this purpose, and you can definitely get into situations where the ios menu overlaps our menu. But when there’s space the ios menu will render under the selection, and our menu always renders above the selection so most of the time there’s no conflict.