Bug report Auto-focus on message input opens virtual keyboard on mobile

club-home

Customer
Watch Party XenStaff XenStreak
Hi, again )! Noticed a bug reproduced on your official demo
Bug: Auto-focus on message input opens virtual keyboard on mobile (android by the way, Chrome)

When opening a conversation on a mobile device, the message input automatically receives focus, which triggers the virtual keyboard. This causes the page to jump/scroll and covers half the screen — even when the user only wants to read the conversation, not reply.

Steps to reproduce:
  1. On a mobile device (tested on Android/Chrome), open any conversation in Immersive Messenger.
  2. The keyboard pops up immediately and the page layout shifts.
Expected behavior (Telegram, WhatsApp, Discord mobile pattern): the keyboard should only appear after the user explicitly taps the message input. Auto-focus is fine on desktop, but on touch devices it should not fire on conversation open.

Suggested fix: only apply auto-focus on devices with a fine pointer (e.g. check window.matchMedia('(pointer: fine)') before calling focus()), and consider focus({ preventScroll: true }) to avoid layout jumps.
 
Fixed, and built into the next update.

The composer no longer takes focus on a touch device, so the keyboard stays down until the member taps the input and opening a conversation to read no longer shifts the page under them. On a desktop the focus still lands in the composer, where it saves a click and costs nothing.

Thank you for testing it on the demo and writing the steps out, that is the kind of report that gets fixed the same day it is understood.
 
Out now, in 1.4.0.

On a touch device the composer no longer takes focus when a conversation opens, so the keyboard stays down until the member taps the input and the page no longer shifts under someone who only wanted to read. On a desktop the focus still lands in the composer.
 
Ready to make your forum unforgettable?Browse the storeSee the plans
Immersive Messenger
From the store

Immersive Messenger

A premium, real-time Discord/Telegram-style messenger for XenForo 2.3, built on native Direct Messages, no paid service required.

49.00€
View in store

Premium XenForo add-ons, built, sold and supported by the developer himself. One-time payments, 12 months of updates, forums that answer back.

Gwendal Grandhomme (EI) · SIREN 107 454 522 · France

Back
Top