diff --git a/assets/javascripts/discourse/components/modal/edit-topic-assignments.gjs b/assets/javascripts/discourse/components/modal/edit-topic-assignments.gjs index 185faa34..768bf71d 100644 --- a/assets/javascripts/discourse/components/modal/edit-topic-assignments.gjs +++ b/assets/javascripts/discourse/components/modal/edit-topic-assignments.gjs @@ -47,7 +47,10 @@ export default class EditTopicAssignments extends Component { diff --git a/spec/system/assign_topic_spec.rb b/spec/system/assign_topic_spec.rb index 1eb9ab88..b30a5b77 100644 --- a/spec/system/assign_topic_spec.rb +++ b/spec/system/assign_topic_spec.rb @@ -35,6 +35,20 @@ expect(page).to have_no_css("#topic .assigned-to") end + it "can submit form with shortcut from texatea" do + visit "/t/#{topic.id}" + + topic_page.click_assign_topic + assign_modal.assignee = staff_user + + find("body").send_keys(:tab) + find("body").send_keys(:control, :enter) + + expect(assign_modal).to be_closed + expect(topic_page).to have_assigned(user: staff_user, at_post: 2) + expect(find("#topic .assigned-to")).to have_content(staff_user.username) + end + context "when assigns are not public" do before { SiteSetting.assigns_public = false }