Materialize: Dropdown closes right away after opening

Created on 16 Apr 2019  路  1Comment  路  Source: Dogfalo/materialize

Chrome: Version 73.0.3683.103 (Official Build) (64-bit)
Materialize verion: 0.100.2

Can be seen here - http://archives.materializecss.com/0.100.2/forms.html
Select closes right after opening.

This is code that causes closing of dropdown (setTimeout handler gets invoked):
https://github.com/Dogfalo/materialize/commit/42051a56d2a35bdd8fbdffab739ee64859b186d4#diff-482573c55de5f85b5364c3b776635db9

Seems to happen only in newer versions of Chrome as this was added back in version 0.98.2:
https://github.com/Dogfalo/materialize/releases/tag/v0.98.2

Interestingly dropdown does not close if it dpops up and not down

Most helpful comment

This short solution may be helpful for someone:
$(document).on("click", ".select-wrapper", function (event) {
event.stopPropagation();
});

>All comments

This short solution may be helpful for someone:
$(document).on("click", ".select-wrapper", function (event) {
event.stopPropagation();
});

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lpgeiger picture lpgeiger  路  3Comments

locomain picture locomain  路  3Comments

serkandurusoy picture serkandurusoy  路  3Comments

Robouste picture Robouste  路  3Comments

artur99 picture artur99  路  3Comments