Commit c44c71f
LUI-208: Fix Node.appendChild error in search results with newer DWR util.js (#240)
The cellCreator function in OpenmrsSearch.js returned options.data directly
when it was already a TD element. The newer DWR util.js (from
org.openmrs.contrib) then calls cell.appendChild(data) on the returned
cell, but since cell === data, this throws 'Node.appendChild: The new
child is an ancestor of the parent' on pages like Find Duplicate Patients
and concept search popups.
Fix: Create a new TD element in cellCreator and transfer all attributes
and child nodes from the original, so the returned cell is always a
different object from the data.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 0f65e29 commit c44c71f
File tree
1 file changed
+27
-2
lines changed- omod/src/main/webapp/resources/scripts/dojo/src/widget/openmrs
1 file changed
+27
-2
lines changedLines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
577 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
578 | 603 | | |
579 | 604 | | |
580 | 605 | | |
| |||
0 commit comments