philomena-dev / philomena

Next-generation imageboard
GNU Affero General Public License v3.0
84 stars 29 forks source link

input-duplicator: migrate to TypeScript #230

Closed liamwhite closed 2 months ago

liamwhite commented 2 months ago

This moves the input duplicator logic, used by the source editor and poll editor, to TypeScript. A bug relating to event delegation occurring in the wrong location was fixed. Conditional logic related to inserting an element in a specific position was eliminated by using the insertAdjacentElement method.

This has 100% test coverage in unit tests and has also been manually integration tested.