WebCoder49 / code-input

Fully customisable, editable, syntax-highlighted textareas + plugins
https://css-tricks.com/creating-an-editable-textarea-that-supports-syntax-highlighted-code/
MIT License
175 stars 23 forks source link

scroll does not occur on overflow #93

Open WhyFenceCode opened 7 months ago

WhyFenceCode commented 7 months ago

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.

WebCoder49 commented 7 months ago

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 commented 5 months ago

This occurs on any of these three occasions:

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 commented 5 months ago

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.