@dhis2-ui/button 9.8.10 → 9.9.0-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -87,8 +87,9 @@ class DropdownButton extends _react.Component {
87
87
  _defineProperty(this, "anchorRef", /*#__PURE__*/_react.default.createRef());
88
88
 
89
89
  _defineProperty(this, "handleKeyDown", event => {
90
+ event.preventDefault();
91
+
90
92
  if (event.key === 'Escape' && this.state.open) {
91
- event.preventDefault();
92
93
  event.stopPropagation();
93
94
  this.setState({
94
95
  open: false
@@ -51,8 +51,9 @@ class SplitButton extends _react.Component {
51
51
  _defineProperty(this, "anchorRef", /*#__PURE__*/_react.default.createRef());
52
52
 
53
53
  _defineProperty(this, "handleKeyDown", event => {
54
+ event.preventDefault();
55
+
54
56
  if (event.key === 'Escape' && this.state.open) {
55
- event.preventDefault();
56
57
  event.stopPropagation();
57
58
  this.setState({
58
59
  open: false
@@ -68,8 +68,9 @@ class DropdownButton extends Component {
68
68
  _defineProperty(this, "anchorRef", /*#__PURE__*/React.createRef());
69
69
 
70
70
  _defineProperty(this, "handleKeyDown", event => {
71
+ event.preventDefault();
72
+
71
73
  if (event.key === 'Escape' && this.state.open) {
72
- event.preventDefault();
73
74
  event.stopPropagation();
74
75
  this.setState({
75
76
  open: false
@@ -29,8 +29,9 @@ class SplitButton extends Component {
29
29
  _defineProperty(this, "anchorRef", /*#__PURE__*/React.createRef());
30
30
 
31
31
  _defineProperty(this, "handleKeyDown", event => {
32
+ event.preventDefault();
33
+
32
34
  if (event.key === 'Escape' && this.state.open) {
33
- event.preventDefault();
34
35
  event.stopPropagation();
35
36
  this.setState({
36
37
  open: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/button",
3
- "version": "9.8.10",
3
+ "version": "9.9.0-alpha.2",
4
4
  "description": "UI Button",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,11 +33,11 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/layer": "9.8.10",
37
- "@dhis2-ui/loader": "9.8.10",
38
- "@dhis2-ui/popper": "9.8.10",
39
- "@dhis2/ui-constants": "9.8.10",
40
- "@dhis2/ui-icons": "9.8.10",
36
+ "@dhis2-ui/layer": "9.9.0-alpha.2",
37
+ "@dhis2-ui/loader": "9.9.0-alpha.2",
38
+ "@dhis2-ui/popper": "9.9.0-alpha.2",
39
+ "@dhis2/ui-constants": "9.9.0-alpha.2",
40
+ "@dhis2/ui-icons": "9.9.0-alpha.2",
41
41
  "classnames": "^2.3.1",
42
42
  "prop-types": "^15.7.2"
43
43
  },