Is it possible to tell whether browser action button is clicked or touched in my extension?

Firefox three bar menu will show different appearance when user click it by mouse vs. touch it on touch screen on a desktop computer.

I want to know if user clicked / touched the browser action button of my extension, so it may show different popup in the same way. How can I do that?

When you click the three bar button

When you touch the three bar button

1 Like

The main thing I know of would be to use a pointer media query:

It not related to media query. It only care about how the button be interacted: Click the button vs. touch the button.

That media query will change its value depending on the pointing device the user is currently using, which is the closest you can currently get to how the larger spacing on touch on windows works.