@nik This was the board I tested it on. 😆 I'm not sure if @julian can shed some light on this as something isn't right with your experience and I'm not sure what would cause these things to happen. It's not your build of NodeBB, it's not one browser or the other as it happens on both Desktop & Mobile, the only thing left is your internet connection, but I don't know whether xhr-polling or websocket issues would cause it.
Replying to posts: Move reply cursor to after username
-
Currently, when you reply to a post in a thread by clicking the Reply link on that post, it inserts the username into the editor and puts the cursor before the username. In my opinion, and this may just be because I'm using to the way mentions work on Twitter, I think the cursor should be automatically placed with a space after the username, like this:
as opposed to this, the way it currently works (although it does add a space at the end of the username):
With the way it currently works, I press the End key on my keyboard and I'm fine, but I think it would be nice if the cursor just started there anyway. Might just be me, though.
-
-
@baris awesome!
-
@baris is it possible to get rid of the username when replying to a post?
-
You can select and delete it
Or you can try something like
$(window).on('action:composer.enhanced', function (ev, data) { if (data.action === 'posts.reply' && data.toPid) { data.postContainer.find('.write').val(''); } });
Keep in mind this will always empty the textarea so it will break quoting you need to only clear it if the text area contains
@username
so might have to add a regex check into the conditional. -
@baris said in Replying to posts: Move reply cursor to after username:
You can select and delete it
Or you can try something like
$(window).on('action:composer.enhanced', function (ev, data) { if (data.action === 'posts.reply' && data.toPid) { data.postContainer.find('.write').val(''); } });
Keep in mind this will always empty the textarea so it will break quoting you need to only clear it if the text area contains
@username
so might have to add a regex check into the conditional.Quoting also contains
@username
. Might need to check for the topic title. -
Yeah need to check the textarea value and make sure it only contains
@username
and nothing else.