Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

fix: close modal using the esc key after pressing other keys #1828

Merged
merged 1 commit into from
Mar 16, 2020

Conversation

brenopolanski
Copy link
Contributor

@brenopolanski brenopolanski commented Mar 12, 2020

Summary

Fixes #1827.

The once property in addEventListener has been removed because if true, the listener would be automatically removed when invoked.

The keyCode is deprecated: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode

The problem with using keyCode is that non-English keyboards can produce different outputs and even keyboards with different layouts can produce inconsistent results.

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@ghost ghost added Complexity: Low Less than 64 lines changed. Type: Bugfix The pull request fixes an incorrect functionality or behaviour. labels Mar 12, 2020
@codecov
Copy link

codecov bot commented Mar 12, 2020

Codecov Report

Merging #1828 into develop will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1828   +/-   ##
========================================
  Coverage    60.15%   60.15%           
========================================
  Files          369      369           
  Lines         9142     9142           
  Branches      1869     1869           
========================================
  Hits          5499     5499           
  Misses        3458     3458           
  Partials       185      185
Impacted Files Coverage Δ
src/renderer/components/Modal/ModalWindow.vue 77.27% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70dbb8d...f82fadd. Read the comment docs.

@brenopolanski brenopolanski changed the title fix: close modal using the "Esc" key after pressing other keys fix: close modal using the esc key after pressing other keys Mar 13, 2020
@faustbrian faustbrian merged commit e965c09 into develop Mar 16, 2020
@ghost ghost deleted the fix/esc-key-modal-window branch March 16, 2020 04:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Complexity: Low Less than 64 lines changed. Type: Bugfix The pull request fixes an incorrect functionality or behaviour.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: esc key does not work when trying to close the modal
2 participants