Topic: Material-select with scrollbar inside modal dont close on option select

Alex Gotardi pro asked 6 years ago


Hi Guys,

In my example, material-select with scrollbar inside modal dont close on option select

Any solution?

 

<div id="new-event-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">New Event</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<fieldset id="fieldset-Start" class="">

<div class="md-form">
<input type="text" name="title" id="title" value="" maxLength="100" required="" class="form-control" length="100"><label for="title" data-error="">Enter a title for your event</label></div>

<div class="md-form">
<select name="category" id="category" class=" mdb-select" required="">
<option value="29">Arquitetura e Urbanismo</option>
<option value="8">Arte</option>
<option value="9">Artes plásticas</option>
<option value="28">Carnaval</option>
<option value="24">Ciência e Tecnologia</option>
<option value="19">Cinema e Vídeo</option>
<option value="10">Circo</option>
<option value="11">Comunidade</option>
<option value="14">Dança</option>
<option value="15">Design</option>
<option value="4">Educação</option>
<option value="26">Esporte</option>
<option value="16">Eventos</option>
<option value="5">Filmes de Ficção</option>
<option value="6">Filmes Documentários</option>
<option value="7">Filmes Universitários</option>
<option value="23">Fotografia</option>
<option value="18">Gastronomia</option>
<option value="12">Humor</option>
<option value="20">Jogos</option>
<option value="21">Jornalismo</option>
<option value="30">Literatura</option>
<option value="2">Meio Ambiente</option>
<option value="1">Mobilidade e Transporte</option>
<option value="17">Moda</option>
<option value="22">Música</option>
<option value="3">Negócios Sociais</option>
<option value="13">Quadrinhos</option>
<option value="33">Shows Internacionais</option>
<option value="32">Shows Nacionais</option>
<option value="25">Teatro</option>
</select><label for="category" data-error="">Categoria</label></div>
<div class="form-fields">
<div class="md-form">
<input type="date" name="event_date_at" id="event_date_at" data-value="" class="form-control">
<label for="event_date_at" class="optional">Data do evento</label></div>
<div class="md-form">
<input type="text" name="event_time_at" id="event_time_at" value="" class="form-control">
<label for="event_time_at" class="optional">Hora do evento</label></div>
<div class="md-form">
<input type="date" name="open_date_at" id="open_date_at" data-value="" class="form-control">
<label for="open_date_at" class="optional">Data de abertura da casa</label></div>
<div class="md-form">
<input type="text" name="open_time_at" id="open_time_at" value="" class="form-control">
<label for="open_time_at" class="optional">Hora da abertura</label></div></div>

<input type="hidden" name="mode" value="flex" id="mode">
<div class="text-xs-center">

<button name="save" id="save" type="submit" class="btn btn-primary">Continuar</button></div></fieldset> </div>
</div>
</div>
</div>

Mikołaj Smoleński staff answered 6 years ago


Hi, We are well informed about that issue and try to fix it in one of the next releases. Regards

Alex Gotardi pro commented 6 years ago

Any idea and date of solution?

Mikołaj Smoleński staff commented 6 years ago

For this moment we suggest to use default select, which is more universal in various cases, especially in modals.

Alex Gotardi pro commented 6 years ago

Another 2 issues: 1. On keyboard select (up/down), options set class eq "selected", but dont change background-color. I fix in _material-select.scss (line 142) -> added &.selected 2. On select with keyboard and press ENTER, active option is set to input, select and dropdown close. (maybe the way is here to fix bug). I temp fix removing max-height for dropdown.js and dropdown-content. Dropdown is big, but dont crash layout. Waiting for definitive fix

Mikołaj Smoleński staff commented 6 years ago

Thanks for Your solutions! We are adding them to our list of most important issues to fix. Best Regards


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags