From 0b296dd8c2aefefe89787be5cc627d44cf431150 Mon Sep 17 00:00:00 2001 From: Joshua Borton Date: Tue, 15 Nov 2016 14:23:26 -0500 Subject: Add Add `onExit` hook to new_channel_modal (#4344) This delays updating the url with the new channel until after the modal is exited which bypasses a state where the center textarea is focused and then focus is removed due to how react-overlays handles restoring focus to the last element focused before the modal was shown. --- webapp/components/change_url_modal.jsx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'webapp/components/change_url_modal.jsx') diff --git a/webapp/components/change_url_modal.jsx b/webapp/components/change_url_modal.jsx index fa115cf36..c9d2f3245 100644 --- a/webapp/components/change_url_modal.jsx +++ b/webapp/components/change_url_modal.jsx @@ -145,6 +145,7 @@ export default class ChangeUrlModal extends React.Component { {this.props.title} @@ -226,5 +227,6 @@ ChangeUrlModal.propTypes = { currentURL: React.PropTypes.string, serverError: React.PropTypes.node, onModalSubmit: React.PropTypes.func.isRequired, + onModalExited: React.PropTypes.func.optional, onModalDismissed: React.PropTypes.func.isRequired }; -- cgit v1.2.3-1-g7c22