code-input icon indicating copy to clipboard operation
code-input copied to clipboard

scroll does not occur on overflow

Open WhyFenceCode opened this issue 1 year ago • 3 comments

While the scrollbar appears it does not auto scroll and so the cursor goes offscreen. It would be nice to have a plugin to do this, so that the user does not need to manually scroll, and so that the side scroll snaps to the cursor if it goes offscreen.

WhyFenceCode avatar Apr 04 '24 20:04 WhyFenceCode

As this is part of the default functionality of a <textarea> element (I think), this should be implemented in the core code, not as a separate plugin. Thank you for pointing it out!

I am quite busy now but will try to start implementing it as soon as possible after 25 May.

WebCoder49 avatar Apr 09 '24 18:04 WebCoder49

This occurs on any of these three occasions:

  • Large piece of text pasted onto a line - goes to middle of pasted text. [Regardless of Indent plugin]
  • Indent plugin enabled and Enter key pressed
  • Indent plugin enabled and Tab key pressed

These are replicated in both Chromium [MS Edge 125.0.2535.51 (Official build) (64-bit)] and Firefox [Developer Edition 127.0b5 (64-bit)] on Windows 11. However, in Firefox pressing the Tab key without selecting text will scroll the textarea right, but only this.

WebCoder49 avatar May 27 '24 09:05 WebCoder49

Fix #100 inadvertently caused bug #115, which makes code-input unusable on mobile devices (note to self: always test on mobile devices!). Another fix is needed that does not blur then focus the textarea, or that does it without interrupting mobile phone typing.

WebCoder49 avatar Jun 16 '24 12:06 WebCoder49