question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: IonSelect is not showing the options when clicked (React)

See original GitHub issue

Bug Report

Ionic version:

@ionic/react 5.1.1,

Current behavior: When clicking on the <IonSelect> element, the options do not get displayed.

Expected behavior: When clicking on the <IonSelect> element, the options are displayed.

Steps to reproduce: / Related code: I’ve tried copy-pasted the code directly from the documentation and still run into this issue.

<IonList>
  <IonItem>
    <IonLabel>Hemisphere</IonLabel>
    <IonSelect
      value={hemisphere}
      interface="popover"
      onIonChange={(e) => {
        SettingsStorage.setHemisphere(e.detail.value!)
        setHemisphere(e.detail.value!)
      }}
    >
      <IonSelectOption value="N">Northern</IonSelectOption>
      <IonSelectOption value="S">Southern</IonSelectOption>
    </IonSelect>
  </IonItem>
</IonList>

Other information: It appears that when I do the following, I am able to get the options to display:

  1. Right click on the <IonSelect> in the browser.
  2. Inspect element
  3. A <button> gets highlighted in the devtools. I delete this
  4. I click the <IonSelect> in the browser again
  5. Options displayed!

Ionic info:

Ionic:
   Ionic CLI       : 6.9.1 (/Users/grardb/.config/yarn/global/node_modules/@ionic/cli)
   Ionic Framework : @ionic/react 5.1.1

Capacitor:
   Capacitor CLI   : 2.1.0
   @capacitor/core : 2.1.0

Utility:
   cordova-res : not installed
   native-run  : not installed

System:
   NodeJS : v11.14.0 (/Users/grardb/.nvm/versions/node/v11.14.0/bin/node)
   npm    : 6.7.0
   OS     : macOS High Sierra

A gif of what’s happening: example

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
liamdebeasicommented, May 28, 2020

Hey there, I filed a bug with the Firefox team: https://bugzilla.mozilla.org/show_bug.cgi?id=1640189. Looks like this has been fixed in Firefox 78, so a fix should be available whenever that ships.

1reaction
liamdebeasicommented, May 20, 2020

Ah you know what this is actually a duplicate of an older bug: https://github.com/ionic-team/ionic/issues/20179. This ended up being a bug in Firefox with Touch Simulation, and not a bug in Ionic Framework.

The workaround for now is to not use Touch Simulation when developing in Firefox. We will report this to the Firefox dev team. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: IonSelect is not showing the options when clicked (React ...
Bug Report Ionic version: @ionic/react 5.1.1, Current behavior: When clicking on the element, the options do not get displayed.
Read more >
React IonSelect not rendering pre selected value from state
The IonSelect doesn't show the pre selected text value when screen loads. If I click the IonSelect then the selected value shows.
Read more >
ion-searchbar - Ionic Framework
A clear button is displayed when a searchbar has a value or upon entering input in the searchbar's text field. Clicking on the...
Read more >
React and Ionic Select Setting values Example - Mobiscroll
Use the buttons option for showing/hiding set , cancel or add custom buttons. Controlling the default value. The select has no selected value...
Read more >
Forms And Validation In Ionic React - Smashing Magazine
Thankfully, it isn't all doom and gloom. I recently came across React Hook Form (RHF), a library for working with forms in React...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found