Commit 5849262
committed
[JENKINS-76249] Fix form submission when a dropdown changes and the web response is slow
calling renderOnDemand can cause the dom to be manipulated
aynchronouslyi due to function calls going to the Jenkins server (e.g.
stapler/bound/xxx/render). When this occurs if there is a subsequent change to the
dropdown selection before this completes, when the HTML is finally
obtained from Jenkins it is inserted into the DOM, but it is inserted as
if it is still the selected option (ie it is not disable for the form).
renderOnDemand takes a callback function that will be called when the
DOM manipulation is complete, however the updateDropDownList did not
pass any function.
We now pass a function that manipulates the just added HTML if the
selected item is in fact no longer selected.1 parent a7d3225 commit 5849262
1 file changed
+45
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1683 | 1683 | | |
1684 | 1684 | | |
1685 | 1685 | | |
1686 | | - | |
1687 | | - | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
1688 | 1689 | | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
1692 | 1693 | | |
1693 | | - | |
1694 | | - | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
1699 | 1702 | | |
1700 | 1703 | | |
| 1704 | + | |
1701 | 1705 | | |
1702 | 1706 | | |
1703 | 1707 | | |
1704 | 1708 | | |
1705 | 1709 | | |
1706 | 1710 | | |
1707 | 1711 | | |
1708 | | - | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
1709 | 1724 | | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
| 1725 | + | |
1724 | 1726 | | |
1725 | 1727 | | |
1726 | 1728 | | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
1727 | 1746 | | |
1728 | 1747 | | |
1729 | 1748 | | |
| |||
0 commit comments