Also list <form> in error message as possible culprit
Max F. Albrecht committed
Jul 1, 2014 at 19:05 UTC
bcea3bee45a84f290e2c64efceb3734412cccf03
3 files changed
+11
-10
src/browser/ui/ReactMount.js
+4
-3
@@ -649,9 +649,10 @@ var ReactMount = {
649
false,
650
'findComponentRoot(..., %s): Unable to find element. This probably ' +
651
'means the DOM was unexpectedly mutated (e.g., by the browser), ' +
652
- 'usually due to forgetting a <tbody> when using tables, nesting <p> ' +
653
- 'or <a> tags, or using non-SVG elements in an <svg> parent. Try ' +
654
- 'inspecting the child nodes of the element with React ID `%s`.',
652
+ 'usually due to forgetting a <tbody> when using tables, nesting tags ' +
653
+ 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' +
654
+ 'parent. ' +
655
+ 'Try inspecting the child nodes of the element with React ID `%s`.',
656
targetID,
657
ReactMount.getID(ancestorNode)
658
);
src/browser/ui/dom/DOMChildrenOperations.js
+3
-3
@@ -119,9 +119,9 @@ var DOMChildrenOperations = {
119
'processUpdates(): Unable to find child %s of element. This ' +
120
'probably means the DOM was unexpectedly mutated (e.g., by the ' +
121
'browser), usually due to forgetting a <tbody> when using tables, ' +
122
- 'nesting <p> or <a> tags, or using non-SVG elements in an <svg> '+
123
- 'parent. Try inspecting the child nodes of the element with React ' +
124
- 'ID `%s`.',
122
+ 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements '+
123
+ 'in an <svg> parent. Try inspecting the child nodes of the element ' +
124
+ 'with React ID `%s`.',
125
updatedIndex,
126
parentID
127
);
src/core/__tests__/ReactInstanceHandles-test.js
+4
-4
@@ -147,10 +147,10 @@ describe('ReactInstanceHandles', function() {
147
'Invariant Violation: findComponentRoot(..., .0.1:0:junk): ' +
148
'Unable to find element. This probably means the DOM was ' +
149
'unexpectedly mutated (e.g., by the browser), usually due to ' +
150
- 'forgetting a <tbody> when using tables, nesting <p> or <a> tags, ' +
151
- 'or using non-SVG elements in an <svg> parent. Try inspecting the ' +
152
- 'child nodes of the element with React ' +
153
- 'ID `.0`.'
150
+ 'forgetting a <tbody> when using tables, nesting tags ' +
151
+ 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' +
152
+ 'parent. ' +
153
+ 'Try inspecting the child nodes of the element with React ID `.0`.'
154
);
155
});
156
});