Skip to content

Commit

Permalink
fix bug around clearing input and pressing enter
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Dubert committed Jun 3, 2016
1 parent adf0a6b commit f298966
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

## 1.2.5

- [bug] fixed bug created by React 15 when clearing input and pressing enter

## 1.2.4

- updated all packages to latest versions (most notably react to 15)
Expand Down
4 changes: 2 additions & 2 deletions dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class App extends Component {
<div style={style.page}>
<header style={style.header}>
<div>
<h1 style={{ margin: 0 }}>React Kronos 1.2.4</h1>
<h1 style={{ margin: 0 }}>React Kronos 1.2.5</h1>
<span style={style.tagline}>A fast, intuitive, and elegant date and time picker for React.</span>
</div>
<div style={style.icon}>
Expand Down
4 changes: 2 additions & 2 deletions examples/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<title>React Kronos 1.2.4</title>
<title>React Kronos 1.2.5</title>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700' rel='stylesheet' type='text/css'>
<style>
html, body, #root {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-kronos",
"version": "1.2.4",
"version": "1.2.5",
"description": "A fast, intuitive, and elegant date and time picker for React.",
"main": "lib/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class Kronos extends Component {
else {
if (!this.state.visible) this.toggle(true)
datetime = this.parse(this.state.input)
this.save(datetime)
if (datetime) this.save(datetime)
}
}
break
Expand All @@ -364,7 +364,7 @@ class Kronos extends Component {
<input
type='text'
ref='input'
value={this.state.input}
value={this.state.input || ''}
onClick={::this.onClickInput}
onFocus={::this.onFocusInput}
onBlur={::this.onBlurInput}
Expand Down

0 comments on commit f298966

Please # to comment.