Materialize: Select does not render at all if .browser-default is added V0.100.2

Created on 8 Sep 2017  路  7Comments  路  Source: Dogfalo/materialize

In the latest commit "v0.100.2", .browser-default in the select element does not render at all.

My code

<select name="homework_type" id="type_a" class="browser-default">
             <option value="" disabled selected>Select Type</option>
             <option value="Daily" selected>Daily</option>
             <option value="Test">Assessment</option>
             <option value="Assignment">Assignment</option>
</select>

<script>$(document).ready(function() { $('select').material_select(); });</script>

It works fine in V0.99.0

awaiting-reply Select

Most helpful comment

I just experienced the same issue. Interestingly enough, it only happens when you surround your select element with a div containing the "input-field" class. If you use the codepen to remove the class from the div tag, the select option appears. Re-add the class and select disappears.

Using Ubuntu 16.04 x64. Appears both in Chrome 61.0.3163.79 and Firefox 55.0.2.

All 7 comments

Please fill out the issue template!
Your issue is lacking:

  1. A codepen
  2. Your environment

I just experienced the same issue. Interestingly enough, it only happens when you surround your select element with a div containing the "input-field" class. If you use the codepen to remove the class from the div tag, the select option appears. Re-add the class and select disappears.

Using Ubuntu 16.04 x64. Appears both in Chrome 61.0.3163.79 and Firefox 55.0.2.

@devansh1110 and @tomscholz , any chance we can re-open this issue? It still isn't fixed. See my comment above for more details.

Thanks!

@Dogfalo Could you reopen this and close #5294?

@dkreider

Temporary Workaround

For this reason, I've been working with Version 99.0 You can import it using
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.min.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/js/materialize.min.js"></script>

It works fine in V99.0.

Thanks,
Devansh

Materialize v0.100.2
Chrome Version 64.0.3282.186 (Offizieller Build) (64-Bit)
Opera Version: 51.0.2830.40

It is also not working for me, too.

The browser default select is not meant to go inside input-field class as is shown in the documentation example, however the change has been reverted in v1-dev (c0649e8c73d0700330bffae76bbe00553e7df642) due to the addition of select helper text system.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MickaelH974 picture MickaelH974  路  3Comments

Robouste picture Robouste  路  3Comments

bradley-varol picture bradley-varol  路  3Comments

acierpinski picture acierpinski  路  3Comments

ericlormul picture ericlormul  路  3Comments