Active-CSS / active-css

The epic event-driven browser language for UI with functionality in one-liner CSS. Over 100 incredible CSS commands for DOM manipulation, ajax, reactive variables, single-page application routing, and lots more. Could CSS be the JavaScript framework of the future?
https://activecss.org
Other
42 stars 7 forks source link

Focus-on type action commands should have a way to position cursor at end of line #105

Closed bob2517 closed 3 years ago

bob2517 commented 3 years ago

When used with input text/textarea fields, focusing puts the cursor at the beginning of the field - native behaviour if the field was not previously in focus and a key event does not enter into a specific position on mousedown in the field.

Rather than changing native defaults to move cursor to the end, there should be an option in the focus-on command to force the position of the cursor to the end of the line on focus.

bob2517 commented 3 years ago

This is done - there's an "end-of-field" option for the command. I've only added input field support for now. If anyone wants contenteditable support I can add it in later on.