From 8c17e5fb3c77da66a682355effe9ce336ead690e Mon Sep 17 00:00:00 2001 From: Juno_okyo Date: Tue, 29 Nov 2016 04:42:32 +0700 Subject: [PATCH] Use multi-selector to remove the same event handler (#20642) --- js/src/modal.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/src/modal.js b/js/src/modal.js index 447e32acfe..61a28dbf5d 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -186,10 +186,7 @@ const Modal = (($) => { dispose() { $.removeData(this._element, DATA_KEY) - $(window).off(EVENT_KEY) - $(document).off(EVENT_KEY) - $(this._element).off(EVENT_KEY) - $(this._backdrop).off(EVENT_KEY) + $(window, document, this._element, this._backdrop).off(EVENT_KEY) this._config = null this._element = null