Ignore arrow keys when modifier keys are pressed (#371)

This commit is contained in:
Uku Taht 2020-10-19 10:56:03 +03:00 committed by GitHub
parent d8c05406d5
commit 8e9459ba99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Do not error when activating an already activated account plausible/analytics#370
- Ignore arrow keys when modifier keys are pressed plausible/analytics#363
### Security
- Do not run the plausible Docker container as root plausible/analytics#362

View File

@ -42,6 +42,8 @@ class DatePicker extends React.Component {
handleKeyup(e) {
const {query, history} = this.props
if (e.ctrlKey || e.ctrlKey || e.altKey) return
if (e.key === 'ArrowLeft') {
if (query.period === 'day') {
const prevDate = formatISO(shiftDays(query.date, -1))