Discourse composer and Firefox on Android tablet

A few days ago, my experience using this forum with the Firefox app on my tablet got a lot worse.

Firefox 134.0 (Build #2016064983)
Android 14
Galaxy Tab S9 FE

Additional note: I have always used Discourse in Firefox with “desktop site” disabled. Otherwise, the font gets way too big. Video showing the size difference:

One regression that is very easy to explain is that the AI menu opens behind the composer, so if I am lucky, I can see almost all options, but sometimes just one or nothing at all. When I create a new topic, it’s one of the latter because the title and category field also cover the menu.



Additionally, I can no longer adjust the height of the composer. The full-screen button and the grip have disappeared. This makes quoting and linking posts much more complicated. The grip is back when I enable “desktop mode” in Firefox’s settings, but, as I explained before, due to the huge size of everything, that isn’t a workaround. In Chrome, the grip is visible regardless of whether “desktop site” is enabled or disabled.

Screenshots taken for comparison before my forum was updated:


The composer height now also depends on whether the preview is shown or not. It’s larger in both directions when the preview is visible. These are the two fixed height options I can choose from by enabling or hiding the preview on the right. So hiding the preview works as a workaround for quoting.


But composing a topic with barely 3 lines visible in the composer is quite difficult. While it seems like showing the preview increases the size of the composer, this is only true until I tap the text field and the keyboard appears. Even scrolling within that small field to navigate to another paragraph is difficult.

Before I was able to increase the size of the composer using the grip at the top.


Now there is always an area at the top that isn’t covered by the composer.

6 Likes

Thanks @Moin, DEV: Improve composer positioning on tablets by pmusaraj · Pull Request #30745 · discourse/discourse · GitHub should address most of the issues you noticed.

On my test Android emulator, I can’t see the same AI menu issue.

1 Like

I didn’t notice any changes

1 Like

Hmm, any chance you can inspect your Firefox browser? The change assumes we detect correctly your device as a tablet device, when inspecting can you see if the html element has the tablet-device class?

1 Like

I think the detection works.

1 Like

I noticed a change

This now it happens in Chrome too. It still works in Chrome on my forum which was updated about 36 hours ago but here the AI modal is now behind the composer.

1 Like

Thanks, yes, I see what the issue is with the AI dropdown. It’s a problem of z-indexes.

@keegan @awesomerobot I need some help here. On tablet, iPad and mobile, we now set a z-index of mobile-composer for the composer when it is open. The reason for this is so that the composer can be layered above the header, especially important on tablet landscape viewports.

The AI helper menu has a lower z-index though (just above z("composer", "dropdown")), which shows up below the composer on tablets. I think this doesn’t affect mobile, the button triggers a modal window there. Would it make sense to switch it to use a modal on tablet as well?

2 Likes

You should see the grippie element now on tablets. And the composer should expand above the header, example in Chrome:

1 Like

I see it in Chrome

but it’s missing in Firefox

And the full-screen composer button is missing in both now. It was quite helpful as it hides title and category field when you create a new topic, so you can use that space for the body

1 Like

I think you are seeing the difference between Desktop Site vs Non-Desktop Site. On Firefox, with Desktop Site toggle set to ON, I see:

With Desktop Site toggle set to OFF, I see:

This is working as expected IMO, the mobile version won’t have the grippie to resize the composer, that’s a conscious decision, the vast majority of mobile devices don’t have the room to resize the composer.

1 Like

Well I use Discourse in desktop-mode. The toggle in the sidebar shows a phone, I see a preview next to the composer and there are no buttons for adding a gif or image at the bottom of the composer.
But as I said before I use Firefox with “desktop site” disabled, because otherwise everything is way to big. But that shouldn’t be the issue as in Chrome it does not matter whether I activate “desktop-site” in it’s settings, I can change the size of the composer in both cases. And it wasn’t a problem in Firefox a week ago.

2 Likes

Right, we made some changes to the composer positioning to fix some longstanding issues, see Reply composer broken on firefox mobile - #6 by pmusaraj

Yeah, I am getting the same results from Chrome, toggling Desktop Site has no effect. When I inspect the user agent with or without that toggle, Chrome has some subtle differences, but crucially neither mode has Mobile in the user agent.

In Firefox, with Desktop Site disabled, I see:

1 Like

Can we fix the problem that the content in Discourse becomes that large when I enable desktop site? I guess not, because that doesn’t seem to be a Discourse problem, because it happens at other websites too. But the increased size of everything is why I don’t want to enable desktop site.

Desktop site disabled:

Desktop site enabled:

Note: the full-screen composer button is also missing when desktop site is enabled and in Chrome.

How does Discourse decide whether I see the mobile composer with the buttons at the bottom right or the desktop composer with a preview next to it? Since I see the desktop version of the preview the detection for that seems to work in Firefox. Can the same technique be used for the option to change the height?

I’m not sure. Firefox differs from Chrome here, right? This does feel like a Firefox-specific issue, maybe there’s an app setting?

@keegan just merged a fix for this: FIX: Composer helper not appearing on tablets by keegangeorge · Pull Request #1064 · discourse/discourse-ai · GitHub, it should be on meta soon.

2 Likes