Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Mask value not hide on browser dev tools focus

Open GlebUrentsev opened this issue 3 years ago • 0 comments

Description The bug is related to hiding the mask on input when there is a focus outside the page (for example, on devtools). When there is a blur from input on devtools and then click on any place on the page but not on input. The mask shows.

Also in Example.1 the bug disappears when there is not event argument in function. Like console.log(123) instead of console.log(event).

One more bugs relate to this issue connected with react-final-form where there is a method like onBlur that useField hook returns "The onBlur function can take a SyntheticFocusEvent like it would if you had given it directly to an component, but you can also just call it: props.input.onBlur() to mark the field as blurred (inactive)." Probably it can effects the mask show/hide logic.

Steps to reproduce Important: After click on dev tools wait 2-3 sec then click on page (step 3) example

Examples

  1. https://codesandbox.io/s/determined-ellis-izlkt - breaks here
  2. https://codesandbox.io/s/billowing-rain-g0qdu - here it is not actually breaks but here you can see some blinking of the input (like focus). In some cases it shows like in first example, in some it just blinks.
  • OS: macOs Big Sur, Windows 10
  • Browser - Chrome (version 93.0.4577.82)
  • Inputmask version (5.0.3, 5.0.6)

GlebUrentsev avatar Sep 21 '21 09:09 GlebUrentsev