typesnippet / antd-phone-input

Advanced, highly customizable phone input component for Ant Design.
https://playground.typesnippet.org/antd-phone-input-5.x/
MIT License
51 stars 10 forks source link

CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet #35

Closed g-vellis-se closed 1 year ago

g-vellis-se commented 1 year ago

Bug description

I have installed antd-phone-input in a clean vite project (vite v.4.3.2) using ant design v.5.5.2 (i.e. the latest version), but I keep getting an error when accessing the page with the phone-input-component via Firefox (v. 114.0 64-bit, i.e. the latest).

Notably, it works fine in all other browsers I have tested it (Chrome and Safari).

To use the component, I used the following code (as suggested in the documention):

import FormItem from "antd/es/form/FormItem"; import PhoneInput from "antd-phone-input";

image

The image below, shows the error I keep getting:

image

Any ideas? Thanks

Reproduction steps

  1. Create a vite project (npm create vite using React and TypeScript)

  2. Install ther latest version of ant design (npm i antd)

  3. Go into any .tsx file (e.g. App.tsx) and 3.1 Introduce the following three import statements: import FormItem from "antd/es/form/FormItem"; import PhoneInput from "antd-phone-input"; import {Form} from "antd"; 3.2 Try to use the PhoneInput component, i.e.

    image
  4. Navigate to the page which the PhoneInput component was added in, using Firefox.

Screenshots

image

Browsers

Firefox

OS

Mac

ArtyomVancyan commented 1 year ago

Hi @g-vellis-se, thanks for reporting the issue. I have passed the reproduction steps but could not get the error you are facing with. As we can see in the error message, it is correlated with React Router. Could you please try to reproduce the issue on one of the following platforms if it is not open source:

My environment and dependencies

g-vellis-se commented 1 year ago

Hi @ArtyomVancyan ,

Thank you very much for the prompt reply.

The issue was caused by the following Firefox plugin: "Adjust Screen Brightness" (see: https://addons.mozilla.org/en-US/firefox/addon/adjust-screen-brightness/). Once I disabled it, everything worked as expected.

vishwajit76 commented 1 year ago

same issue

ArtyomVancyan commented 1 year ago

@vishwajit76, please share some code snippets. Try to disable browser add-ons one by one to find the possible cause.