Skip to content

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

DEV: chat modal inline emoji picker (#36341)

David Battersby11dfd9f2f4a5
diff --git a/frontend/discourse/app/components/d-modal.gjs b/frontend/discourse/app/components/d-modal.gjs
index cdcd2516864..c049d8e2731 100644
--- a/frontend/discourse/app/components/d-modal.gjs
+++ b/frontend/discourse/app/components/d-modal.gjs
@@ -196,6 +196,7 @@ export default class DModal extends Component {
// Prevent keyboard events from leaking to elements behind the modal
if (!this.wrapperElement.contains(document.activeElement)) {
event.stopPropagation();
+ event.preventDefault();
}
if (event.key === "Escape" && this.dismissable) {
diff --git a/frontend/discourse/app/components/emoji-picker/index.gjs b/frontend/discourse/app/components/emoji-picker/index.gjs
index 02dc97e993d..db135438e0b 100644
--- a/frontend/discourse/app/components/emoji-picker/index.gjs
+++ b/frontend/discourse/app/components/emoji-picker/index.gjs
@@ -35,6 +35,7 @@ export default class EmojiPicker extends Component {
@maxWidth={{405}}
@onShow={{@onShow}}
@onClose={{@onClose}}
+ @inline={{@inline}}
>
<:trigger>
{{#if @emoji}}
diff --git a/frontend/discourse/app/components/user-status-picker.gjs b/frontend/discourse/app/components/user-status-picker.gjs
index 2003c324fc2..04cb8cb07de 100644
--- a/frontend/discourse/app/components/user-status-picker.gjs
+++ b/frontend/discourse/app/components/user-status-picker.gjs
@@ -51,6 +51,7 @@ export default class UserStatusPicker extends Component {
@btnClass="btn-emoji"
@modalForMobile={{false}}
@context="user-status"
+ @inline={{true}}
/>
<input
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/create-channel.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/create-channel.gjs
index 484a936ca0d..400211bac83 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/create-channel.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/create-channel.gjs
@@ -366,6 +366,7 @@ export default class ChatModalCreateChannel extends Component {
@btnClass="btn-emoji"
@modalForMobile={{false}}
@context="channel-emoji"
+ @inline={{true}}
/>
<DButton
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs
index 3a885a5318e..39b91ab8cfa 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat/modal/edit-channel-name.gjs
@@ -172,6 +172,7 @@ export default class ChatModalEditChannelName extends Component {
@btnClass="btn-emoji"
@modalForMobile={{false}}
@context="channel-emoji"
+ @inline={{true}}
/>
<DButton
diff --git a/plugins/discourse-ai/spec/system/ai_helper/ai_proofreading_spec.rb b/plugins/discourse-ai/spec/system/ai_helper/ai_proofreading_spec.rb
index 2400d80070b..b6cd21174c7 100644
--- a/plugins/discourse-ai/spec/system/ai_helper/ai_proofreading_spec.rb
+++ b/plugins/discourse-ai/spec/system/ai_helper/ai_proofreading_spec.rb
@@ -71,7 +71,7 @@ RSpec.describe "AI Composer Proofreading Features", type: :system do
end
end
- xit "confirms changes when pressing Enter" do
+ it "confirms changes when pressing Enter" do
visit "/new-topic"
composer.fill_content("hello worrld")