Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX #14628] Don’t use preventDefault() on IE unless the user pressed enter #14667

Merged
merged 4 commits into from
Oct 30, 2017

Conversation

mattapperson
Copy link
Contributor

This PR fixes issue #14628

React 15.x has issues with event.preventDefault() in ie, while one of those issues is fixed in 15.6.1, the other (facebook/react#7281) is not. This PR is a patch to work around the issue until kibana moves to react 16.x

Tested in:

  • The latest chrome and safari on osx for any regressions
  • ie 11 on windows 10
  • ie 10 on windows 7 (in a VM)
  • Edge on windows 10

@mattapperson mattapperson changed the title [FIX #14628] Don’t use prevent default on IE unless the user pressed enter [FIX #14628] Don’t use preventDefault() on IE unless the user pressed enter Oct 30, 2017
@simianhacker
Copy link
Member

This also needs to be implemented in create_number_handler

const value = Number(_.get(e, 'target.value', defaultValue));
if (_.isFunction(handleChange)) {
return handleChange({ [name]: value });
}
};
};

function detectIE() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be a library that's shared in both files?

@mattapperson
Copy link
Contributor Author

@simianhacker updated

@@ -1,10 +1,14 @@
import _ from 'lodash';
import detectIE from './is-ie';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change this to work like

import { isIE } from './is_ie';

or

import { detectIE } from './detect_id';

We stopped relying on exporting defaults and we also use snake case for all our filenames.

@@ -0,0 +1,25 @@
export default function detectIE() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't export default... just export the function name.

@mattapperson
Copy link
Contributor Author

fixed and fixed

@simianhacker simianhacker added Feature:TSVB TSVB (Time Series Visual Builder) Feature:Visualizations Generic visualization features (in case no more specific feature label is available) review v6.0.0 v6.0.0-rc2 v6.1.0 labels Oct 30, 2017
@simianhacker
Copy link
Member

LGTM... Make sure and back port to 6.0 and 6.x

@mattapperson mattapperson merged commit c00fa9e into elastic:master Oct 30, 2017
mattapperson added a commit that referenced this pull request Oct 30, 2017
… enter (#14667)

* Don’t use prevent default on IE unless the user pressed enter

* Implament ie fix on number fields too

* share the ie detection lib

* change file names and export types
mattapperson added a commit that referenced this pull request Oct 30, 2017
… enter (#14667)

* Don’t use prevent default on IE unless the user pressed enter

* Implament ie fix on number fields too

* share the ie detection lib

* change file names and export types
@mattapperson
Copy link
Contributor Author

backported to 6.0 and 6.x (c805c3b)

@mattapperson mattapperson deleted the tsvb-ie-input-fix branch October 30, 2017 21:27
@LeeDr
Copy link

LeeDr commented Nov 7, 2017

I reopened the issue #14628 because I'm still seeing the same behavior on the 6.0.0 BC1 build from yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:TSVB TSVB (Time Series Visual Builder) Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:fix review v6.0.0-rc2 v6.0.0 v6.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants