bennett icon indicating copy to clipboard operation
bennett copied to clipboard

ztext: Selections sometimes contain duplicate text for each layer

Open Fire- opened this issue 5 years ago • 3 comments

This is a really cool project!

It looks like sometimes attempts to select and copy a string duplicate the string in the selection for each layer present. For example:

image

Similarly, copying the "80px" in a different example produced the following clipboard contents:

80px
80px
80px
80px
80px
80px
80px
80px
80px
80px

I believe this is mostly just an artifact of how layering is accomplished, but that the results were inconsistent is what I find most curious - further attempts to replicate this seem to result in only one copy in the clipboard ( though an extra line feed seems to be tagging along as well )

Fire- avatar Aug 27 '20 00:08 Fire-

Could you provide sample code or a link to a codepen?

LarryBattle avatar Aug 27 '20 01:08 LarryBattle

The one on the example page does this on mobile (if I hold the text to select, and if I change the selection, it disappears), and CTRL + A does the same

JamDon2 avatar Sep 23 '20 06:09 JamDon2

I'm aware of this issue. Not sure what else I can do about it. user-select:none and especially pointer-events: none are applied to the duplicate layers yet Chrome still selects that text. Still open to suggestions though

bennettfeely avatar Nov 22 '20 03:11 bennettfeely