Fix entering number in custom range picker

Fixes #831
This commit is contained in:
Uku Taht 2021-04-01 10:12:01 +03:00
parent ec9134e14f
commit ced4f75395
2 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,8 @@ class DatePicker extends React.Component {
handleKeydown(e) {
const { query, history } = this.props;
if (e.ctrlKey || e.metaKey || e.altKey || e.isComposing || e.keyCode === 229) return
if (e.target.tagName === 'INPUT') return true;
if (e.ctrlKey || e.metaKey || e.altKey || e.isComposing || e.keyCode === 229) return;
const newSearch = {
period: false,

View File

@ -47,7 +47,8 @@ export default class SiteSwitcher extends React.Component {
const { query, history, site } = this.props;
const { sites } = this.state;
if (e.ctrlKey || e.metaKey || e.altKey || e.isComposing || e.keyCode === 229 || !sites) return
if (e.target.tagName === 'INPUT') return true;
if (e.ctrlKey || e.metaKey || e.altKey || e.isComposing || e.keyCode === 229 || !sites);
const siteNum = parseInt(e.key)