Skip to content

Getting runtime error "Error Cannot read property 'focus' of null" #450

@kassah-mahmoud

Description

@kassah-mahmoud

Hi, I am just having a normal use as follows:

<PhoneInput 
      inputClass={"profile-phoneInput px18"}
      dropdownClass={"profile-phoneDropDown px18"}
      buttonClass={"profile-phoneFlag ml-3"}
      searchClass={"profile-phoneSearch"}
      country={"eg"}
      value={state.phoneNumber}
      onChange={(value, data) =>
        onChangePhone(value, data, "phoneNumber")
      }
      enableAreaCodes={true}
      enableSearch={true}
      disableSearchIcon={true}
      countryCodeEditable={false}
      regions={["middle-east", "africa"]}
      excludeCountries={["il"]}
  />

When I change the dial code from the dropdown, I got the following runtime error:

Error in function r.cursorToEnd in ./node_modules/react-phone-input-2/lib/lib.js:6
Cannot read property 'focus' of null

Any ideas about this issue?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions