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

Move mouse event disabling on interactive elements to SimpleEventPlugin. Related perf tweak to click handlers. #7642

Merged
merged 8 commits into from
Sep 8, 2016
Prev Previous commit
Next Next commit
Switch isInteractive tag order for alignment
  • Loading branch information
nhunzaker committed Sep 8, 2016
commit a408ae26dc86301b6ffec05837bedb03b645080b
2 changes: 1 addition & 1 deletion src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function getDictionaryKey(inst: ReactInstance): string {

function isInteractive(tag) {
return tag === 'button' || tag === 'input' ||
Copy link
Collaborator

Choose a reason for hiding this comment

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

return (
  tag === 'button' || tag === 'input' ||
  tag === 'select' || tag === 'textarea'
);

FB style doesn't do large indents to line up with previous lines – we just move the previous line down instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, for whatever reason I totally caught your comment wrong before. Just a sec.

tag === 'textarea' || tag === 'select';
tag === 'select' || tag === 'textarea';
}

function shouldPreventMouseEvent(inst) {
Expand Down