0

I added mouse up and mouse down event for each character in a text, the event is working correctly if I don't select the last character in a line, it's not called if the last character in a line is selected.

So my question is does browser automatically select the <br> tag when user select the last character in a line? Thanks.

typeof programmer
  • 1,509
  • 4
  • 22
  • 34
  • just add mouse up event to the document and check text selection: https://stackoverflow.com/questions/3545018/selected-text-event-trigger-in-javascript – juvian Jul 02 '18 at 17:57
  • The thing is the mouse up event is not being called if I select the last character in a line. – typeof programmer Jul 02 '18 at 17:58
  • 2
    please post your code. it's difficult to pinpoint a problem without code. – daddygames Jul 02 '18 at 18:07
  • Thanks for your link, the reason why I added mouse up and mouse down event for each character was because I need to count the user selected text's position in the whole text and some other information. My key question is to know does browser automatically select break line tag when user selects last character in a line. Thanks. – typeof programmer Jul 02 '18 at 18:07

0 Answers0