I use Epichrome to create a site-specific browser for Gmail. Clicking attachment icons in Gmail causes a new window to open in my system's default brower (Chrome), which I'd like to avoid. Epichrome Helper's "Custom Rules" should help here, but I can't figure out the right pattern to use.
Here are the two patterns I'm using:
for both rules, set "And would open in:" to "Either" and "Then open it with:" to "This app". But clicking attachments still causes them to open in my system's default browser.