Skip to content

A platform for community discussion. Free, open, simple.

UX: Use `capabilities.isMobileDevice` for chat keyboard behavior (#37884)

David Taylor169f4aa8ce00
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-composer.gjs
index 9b0abedf40a..79578b78d1a 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer.gjs
@@ -378,7 +378,7 @@ export default class ChatComposer extends Component {
@action
onKeyDown(event) {
if (
- this.site.mobileView ||
+ this.capabilities.isMobileDevice ||
event.altKey ||
event.isComposing ||
this.#isAutocompleteDisplayed()