pts icon indicating copy to clipboard operation
pts copied to clipboard

Should different DOM forms use seperate domIDs?

Open Yvee1 opened this issue 4 years ago • 1 comments

I was trying out multiple forms in HTML space, I had 1 form for drawing circles and 1 form for drawing text. This resulted in the text being placed in the circles (or the circles around the text depending on the order of operations) since both forms start counting with the same kind of domID from 0. So the first text and first circle have the same ID and hence get placed in the same HTML element, and thus also at the same location. This is a bug and not a feature, right?

Maybe something like a formID can be added such that forms don't interfere with each other.

Yvee1 avatar Aug 12 '19 10:08 Yvee1

Yep, there's definitely a bug as I didn't account for multiple HTMLForms. Agreed that we need to keep track of created HTMLForms via some incremental ids.

williamngan avatar Aug 21 '19 07:08 williamngan