]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Use onCancel on any modal event
authorStephan Müller <smueller@suse.com>
Tue, 30 Jul 2019 15:55:53 +0000 (17:55 +0200)
committerStephan Müller <smueller@suse.com>
Wed, 4 Sep 2019 14:22:33 +0000 (16:22 +0200)
commit7406d5e02d751f22a0e3efb807d541d82ab48c29
tree86f0f542aa3902b683728e6f6137eca8f562ec51
parent4685dcd450b93b662dffdbdf62d5f8332d05dc12
mgr/dashboard: Use onCancel on any modal event

The problem was, that if 'onCancel' was provided, it wasn't used in all
modal exit cases. Only for the close buttons (the X and the labeled
one), but not if you clicked outside the modal or hit escape.

'onCancel' is currently only used inside the user management form, where
the problem caused, that the submit button was not longer click able if
the modal was hidden through clicking outside of it or hitting escape.

Fixes: https://tracker.ceph.com/issues/40828
Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/components/confirmation-modal/confirmation-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/confirmation-modal/confirmation-modal.component.ts