Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ describe('ReactDOMComponent', function() {
);
});

it('should warn for onDblClick prop', function() {
spyOn(console, 'error');
var container = document.createElement('div');
ReactDOM.render(<div onDblClick={() => {}} />, container);
expect(console.error.calls.count(0)).toBe(1);
expect(normalizeCodeLocInfo(console.error.calls.argsFor(0)[0])).toBe(
'Warning: Unknown event handler property onDblClick. Did you mean `onDoubleClick`?\n in div (at **)'
);
});


it('should warn about styles with numeric string values for non-unitless properties', function() {
spyOn(console, 'error');

Expand Down
5 changes: 5 additions & 0 deletions src/renderers/shared/stack/event/EventPluginRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ function publishRegistrationName(registrationName, PluginModule, eventName) {
var lowerCasedName = registrationName.toLowerCase();
EventPluginRegistry.possibleRegistrationNames[lowerCasedName] =
registrationName;


if (registrationName === 'onDoubleClick') {
EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
}
}
}

Expand Down