]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Use multi-selector to remove the same event handler (#20642)
authorJuno_okyo <J2TeaM@users.noreply.github.com>
Mon, 28 Nov 2016 21:42:32 +0000 (04:42 +0700)
committerMark Otto <markd.otto@gmail.com>
Mon, 28 Nov 2016 21:42:32 +0000 (13:42 -0800)
js/src/modal.js

index 447e32acfe373d12b2d6ec7230a9b36683450ca4..61a28dbf5df74724228284d84b3fd83af58feb94 100644 (file)
@@ -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