Skip to content

Commit 15942f1

Browse files
committed
ping autocomplete should be available when renaming threads too
1 parent ce57a99 commit 15942f1

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

app/assets/javascripts/comments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ $(() => {
236236
* @type {Record<`${number}-${number}`, Record<string, number>>}
237237
*/
238238
const pingable = {};
239-
$(document).on('keyup', '.js-comment-field, .js-thread-title', pingable_popup);
239+
$(document).on('keyup', '.js-comment-field, .js-thread-title-field', pingable_popup);
240240

241241
/**
242242
* @type {QPixelPingablePopupCallback}

app/views/comments/_new_thread_modal.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
be shown.
4141
</span>
4242
<%= text_field_tag :title, '',
43-
class: 'form-element js-thread-title',
43+
class: 'form-element js-thread-title-field',
4444
data: { post: post.id,
4545
thread: '-1',
4646
character_count: ".js-character-count-thread-title" } %>

app/views/comments/_rename_thread_modal.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
</div>
1717
<div class="modal--body">
1818
<%= label_tag :title, 'Title', class: 'form-element' %>
19-
<%= text_field_tag :title, thread.title, class: 'form-element' %>
19+
<%= text_field_tag :title,
20+
thread.title,
21+
class: 'form-element js-thread-title-field',
22+
data: { post: thread.post.id, thread: thread.id } %>
2023
</div>
2124
<div class="modal--footer">
2225
<%= submit_tag 'Update thread', class: 'button is-muted is-filled' %>

0 commit comments

Comments
 (0)