Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datepicker error with chrome 73 #6323

Closed
erict54757 opened this issue Apr 1, 2019 · 2 comments
Closed

datepicker error with chrome 73 #6323

erict54757 opened this issue Apr 1, 2019 · 2 comments

Comments

@erict54757
Copy link

When asking general "how to" questions:

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

Context

DatePicker will instantly close on select in materialize-css version 0.100.2. in browser chrome 73.

a fix is to add a settimeout in line 7084 of dist/materialize js.
snippet of fix:
// Separated for IE
function handleFocusToOpenEvent(event) {

  // Stop the event from propagating to the doc.
  event.stopPropagation();

  // If it’s a focus event, add the “focused” class to the root.
  if (event.type == 'focus') {
    P.$root.addClass(CLASSES.focused);
  }

  // And then finally open the picker.
 setTimeout(function(){ P.open();},50)
}

// Return a new picker instance.
return new PickerInstance();

} //PickerConstructor

  • Version used:
  • Browser Name and version:chrome 73
  • Operating System and version (desktop):desktop only experiences this issue
@DanielRuf
Copy link
Contributor

Hi, this is a duplicate of the previously closed issues.

See https://github.com/Dogfalo/materialize/issues?q=is%3Aissue+is%3Aclosed

@DanielRuf
Copy link
Contributor

a fix is to add a settimeout

This is not a fix but a hack as this will put all invocations on the timer stack and block the JS. Please check debouncing and throttling.

@Dogfalo Dogfalo closed this as completed Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants