lainchan / q

delete post checkbox

Arisu Mizuki · 2017-06-26 19:58
I have found a weird behaviour with the delete checkbox. It seems that you can click anything beside it untill another block comes up and it will check it. For example: If i want to copy the Subject of a thread by double-clicking it it will check the delete checkbox. i can click on any text thats on the same line which will check the box untill i come to another inline-block, the <a> link to the post number for example. Not all checkboxes behave like this, the checkboxes for updating the thread automatically and scrolling with posts are only checked when clicked in their box. Besides fixing this wierd behavior im also wonder what is causing this. How can the input be interactable beyond its own block onto neighboring text till the next inline-block?
Appleman1234 · 2017-06-26 22:20
>>4236 This seems to be a feature of vichan and tinyboard, e.g. the label for delete post is the entire post heading bar since from at least 2011, E.g. https://github.com/vichan-devel/vichan/blob/0629bf68f7eee1fd88d9227124b93a984c1868b9/templates/post_reply.html#L7 https://github.com/savetheinternet/Tinyboard/blob/0629bf68f7eee1fd88d9227124b93a984c1868b9/templates/post_reply.html#L7 https://github.com/lainchan/lainchan/blob/master/templates/post_thread.html#L10 For why label works like that : The <label> element does not render as anything special for the user. However, it provides a usability improvement for mouse users, because if the user clicks on the text within the <label> element, it toggles the control. The fix should be to reduce the scope of the label to just the checkbox, though I am not sure of any consequences doing so will cause just yet. It looks like vichan.net proper just plasters over this with post-menu.js and fix-report-delete-submit.js which we don't use.