React version: 17.0.0-rc.0
Steps To Reproduce
- Open the codesandbox demo link below.
- Click on the
root and portal divs, check the logs.
- Uncomment the
portal div's onClickCapture noop handler, check the logs again.
Link to code example: https://codesandbox.io/s/determined-montalcini-vjrgc?file=/src/App.js
The current behavior
Clicking on the portal div logs "portal click" only.
Adding an onClickCapture noop handler on the portal div "fixes" the root's onClickCapture handler.
You might have to refresh the page between edits, otherwise the root's onClickCapture handler might keep working even after removing the portal's onClickCapture handler.
The expected behavior
Clicking on the portal div should trigger the root's onClickCapture handler, whether the portal div has an onClickCapture handler or not.
React version: 17.0.0-rc.0
Steps To Reproduce
rootandportaldivs, check the logs.portaldiv'sonClickCapturenoop handler, check the logs again.Link to code example: https://codesandbox.io/s/determined-montalcini-vjrgc?file=/src/App.js
The current behavior
Clicking on the
portaldiv logs"portal click"only.Adding an
onClickCapturenoop handler on theportaldiv "fixes" the root'sonClickCapturehandler.You might have to refresh the page between edits, otherwise the root's
onClickCapturehandler might keep working even after removing the portal'sonClickCapturehandler.The expected behavior
Clicking on the
portaldiv should trigger the root'sonClickCapturehandler, whether the portal div has anonClickCapturehandler or not.