htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
Other
4.9k stars 309 forks source link

Simple select example doesn't load #431

Closed sebGH06 closed 3 months ago

sebGH06 commented 3 months ago

Summary

Simple Select with id="hs-pro-select-language" doesn't load

Steps to Reproduce

1 I copied the sample

  1. All is displayed properly except the select button that is not loading

Demo Link

https://preline.co/pro/examples/authentication.html

Expected Behavior

The select should show the country items

Actual Behavior

The select of the Pro Login Auth example do not load and ther eis an error thrown in dev console

Uncaught SyntaxError: Expected ',' or '}' after property value in JSON at position 1196 (line 7 column 139) at JSON.parse () at preline.js?v=12a49c1d:5855:37 at NodeList.forEach () at _HSSelect.autoInit (preline.js?v=12a49c1d:5847:80) at preline.js?v=12a49c1d:6033:12

Screenshots

No response

Mr-Zafar commented 3 months ago

We aren't able to identify issues when content is copied and pasted into a new HTML document. If you're using any frameworks or custom code, we may not be able to assist with integration or customization.

For any issues related to Pro content, please feel free to reach out to us via chat on our website.

sebGH06 commented 3 months ago

I found the issue, it comes from you, when I copied the html source with "copy to clipboard with dark classes" not selected, the html is not well parsed

Original : class=\"shrink-0 size-3.5 text-gray-800 dark:text-neutral-200\"

with no dark mode : class=\"shrink-0 size-3.5 text-gray-800"

As you can see it should end with \"

It happens everywhere dark was at the end of string before parsing

Hope this can help!