Merge pull request #773 from openedx/ahtesham/VAN-1317/dropdown-issue-in-safari-browser

fix: country dropdown issue on safari
This commit is contained in:
Blue
2023-03-13 10:33:47 +05:00
committed by GitHub

View File

@@ -54,6 +54,10 @@ const CountryField = (props) => {
value={countryName}
key={country[COUNTRY_CODE_KEY]}
onClick={(event) => onBlurHandler(event, true, countryName)}
/* This event will prevent the blur event to be fired,
as blur event is having higher priority than click event and restricts the click event.
*/
onMouseDown={(event) => event.preventDefault()}
>
{countryName.length > 30 ? countryName.substring(0, 30).concat('...') : countryName}
</button>