Skip to content

Commit ce57a99

Browse files
committed
enabled thread title pings autocomplete
1 parent 40d00c2 commit ce57a99

2 files changed

Lines changed: 6 additions & 2 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', pingable_popup);
239+
$(document).on('keyup', '.js-comment-field, .js-thread-title', pingable_popup);
240240

241241
/**
242242
* @type {QPixelPingablePopupCallback}

app/views/comments/_new_thread_modal.html.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
You can give your comment thread a title. If you leave this blank, the beginning of the initial comment will
4040
be shown.
4141
</span>
42-
<%= text_field_tag :title, '', class: 'form-element', data: { character_count: ".js-character-count-thread-title" } %>
42+
<%= text_field_tag :title, '',
43+
class: 'form-element js-thread-title',
44+
data: { post: post.id,
45+
thread: '-1',
46+
character_count: ".js-character-count-thread-title" } %>
4347
<%= render 'shared/char_count', type: 'thread-title' %>
4448

4549
<%= submit_tag 'Create thread', class: 'button is-filled', id: "create_thread_button_#{post.id}", disabled: true %>

0 commit comments

Comments
 (0)