Skip to content

Retain focus on the room search line edit when switching channels

Milian Wolff requested to merge work/switch-channels-via-keyboard into master

Changing a channel via the keyboard with the search line edit focused eventually ends up calling RoomWidget::setChannelSelected. This then calls:

    mRoomWidgetBase->messageLineWidget()->setFocus();

That means we can only change one room at most, and would have to press Ctrl+K again to re-focus the search line edit. That is very inconvenient and behaved differently in the past.

With this patch here, we retain the focus on the search line edit when it had it at the point we are triggering the room change. Thereby we can once again scroll through multiple channels easily.

Merge request reports