oruga icon indicating copy to clipboard operation
oruga copied to clipboard

Datepicker with openOnFocus not showing on click.

Open maximoosemine opened this issue 2 years ago • 0 comments

Overview of the problem

Oruga version: 0.5.5 Vuejs version: 3.2.31 OS/Browser: Win 10/Chrome

Description

In a narrow viewport, when clicking on an out of focus datepicker with the "openOnFocus" prop, the datepicker will show on mouse down, then hide on mouse up. This issue doesn't occur if the datepicker is already in focus. Here is a GIF showing the issue:

orugaDatepickerBug

In this GIF, the only prop on the datepicker is "openOnFocus", and the only element on the page is the datepicker element. This was done in a fresh Vue project with no other packages except Oruga.

Steps to reproduce

  1. Navigate to a page with a datepicker with the "openOnFocus" prop, with your viewport narrow enough for the datepicker to overlay the page rather than drop down below the field.
  2. Make sure the datepicker is out of focus.
  3. Click the datepicker.

Expected behavior

The datepicker overlay to stay open when clicked.

Actual behavior

The datepicker overlay appears on mouse down, but disappears on mouse up.

maximoosemine avatar Apr 11 '22 23:04 maximoosemine