verbb / icon-picker

A Craft CMS field to select SVG or font icons from a folder for use in your content.
Other
17 stars 8 forks source link

Scrolling in overlay mixes up icons #69

Closed ctigelaar closed 1 year ago

ctigelaar commented 1 year ago

Describe the bug

I've realised that after upgrading to v2.0.8 I have a weird bug. In the meantime I updated to 2.0.11 and it's also present there. Once I scroll to find an icon and scroll up again, the icons are all mixed up. The titles are still correct, but the SVG icons do not belong to the titles. See attached video (mark the upper left icon, 001-pills) and see how it gets completely different icons on every scroll down/up action. Once you select the icon, it will use the value 001-pills. I am using SVG icon sets, so there are a lot of icons to be displayed there. In this example there are 291 SVG icons displayed.

https://user-images.githubusercontent.com/10415373/208291910-e13a6cb5-2a7a-4e5e-aac0-ad761336333f.mp4

Steps to reproduce

  1. See description

Craft CMS version

4.3.4

Plugin version

2.0.11

Multi-site?

No

Additional context

No response

engram-design commented 1 year ago

This would be due to the virtual scroll list we use for performance when rendering - saving rendering all the DOM nodes for each individual icon. I'll investigate further.

micahmorgan1 commented 1 year ago

I'm also having this issue on 2.0.11

engram-design commented 1 year ago

Fixed in 2.0.12