easy-markdown-editor icon indicating copy to clipboard operation
easy-markdown-editor copied to clipboard

Home and End keyboard keys jump to start/end of the paragraph instead of the line

Open FishieCat opened this issue 7 months ago • 0 comments

Normal behavior in Google docs, MS Word, Notepad, Notepad++, LibreOffice Writer, any HTML textarea or GitHub's issue reporting system is that the Home and End keyboard keys jump to start/end of the line in the text area.

In EasyMDE, instead they jump to the start/end of the paragraph, skipping visual line breaks.

To Reproduce

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer eget euismod arcu. Pellentesque dictum porttitor sagittis. Nulla lobortis tempor purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Donec tempus eleifend magna auctor pellentesque. Sed scelerisque porttitor ex vel scelerisque. Aenean congue turpis eget diam accumsan venenatis. Nulla auctor bibendum turpis id condimentum. Sed nec urna commodo, malesuada lectus ut, hendrerit turpis. Etiam a viverra nisl, eget venenatis nibh. Fusce ac lorem sagittis, consequat lacus id, pretium augue. Quisque id nisl nibh. Quisque at nisl ut neque pharetra ultricies sed sit amet tortor. Nam commodo, enim sed porttitor malesuada, purus lorem tincidunt felis, ac sollicitudin eros quam quis mi. Donec nec libero facilisis, mollis nunc et, porta nibh. Donec mi neque, bibendum ac consequat eu, pulvinar quis nulla.

  1. Paste the text above into https://stackblitz.com/edit/easymde
  2. Position the text cursor in the first word in the first line
  3. Press the End key and observe the result
  4. To better illustrate, hold down Shift while pressing End

Current behavior

The entire paragraph gets skipped/selected:

current

Expected behavior Only the first visible line should be skipped/selected:

expected

Try HTML textarea or any major text editor or word processor for the expected behavior.

Version information

  • OS: Windows 10
  • Browser: Chrome 135.0.7049.115
  • EasyMDE version: whatever is running on stackblitz.com/edit/easymde

FishieCat avatar May 04 '25 21:05 FishieCat