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.

Can't select options or scroll in select input on mobile

See original GitHub issue

I can’t seem to figure out why this happens, when I try to select an option on a select input on android mobile it doesn’t select it, instead, it selects what’s behind it. If I click on the select input and then again on the first options (which is on top of the input) the select will close and reopen like if I clicked the input instead of the option.

<div className="input-field col s12 m6">
  <select
    name={`${categoryId ? 'categoryId' : 'category'}`}
    value={categoryId}
    onChange={handleChange}
  >
    <option value="" selected disabled>Seleccione una opción</option>
    {
      categories.map((category, index) => (
        <option key={index} value={category.id}>{category.name}</option>
      ))
    }
  </select>
  <label>Categoría</label>
</div>

materializecsserror

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

21reactions
cpelikancommented, Jul 13, 2018

I found the solution! With the meta viewport like this work fine for me.

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">

4reactions
milonas115commented, Feb 14, 2017

Rewrote the entire plugin because it unfortunately sucks. https://jsfiddle.net/c6buv1j8/11/

See #4152

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't scroll within mobile drop down nav
I am having some troubles with the mobile menu landscape, - I am unable to scroll. To clearify I ment by scrolling so...
Read more >
Select List Menu Won't Scroll All the Way Down
I have a long menu with about 14 menu options which was created with the Select and Option elements. In Chrome's mobile view...
Read more >
<select>: The HTML Select element - HTML - MDN Web Docs
A Boolean attribute indicating that an option with a non-empty string value must be selected. size. If the control is presented as a...
Read more >
Angular ng-select
A function to compare the option values with the selected values. The first argument is a value from an option. The second is...
Read more >
Select scroller demos for web and mobile
Renders a scroller on touch and a dropdown on desktop. Use it in custom event add/edit forms or on any input, field and...
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