diff options
| author | Chris Rebert <[email protected]> | 2015-03-06 04:34:28 -0800 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2015-03-09 01:05:43 -0700 |
| commit | 725c6848c362f90bbdb931dcea70d40a1753d768 (patch) | |
| tree | 9e17ecd543ff3cc5f1e3a7c7d30c9cf4faf49888 /js/tests/index.html | |
| parent | 21d56378e1f7ec1cd24ffefcad32357267930c74 (diff) | |
| download | bootstrap-725c6848c362f90bbdb931dcea70d40a1753d768.tar.xz bootstrap-725c6848c362f90bbdb931dcea70d40a1753d768.zip | |
Disable jQuery event aliases when running test suite
To ensure that we don't accidentally use any of the aliases.
This should prevent any future regressions from #12761.
Also updates the test suite since it now can't use these aliases either.
Diffstat (limited to 'js/tests/index.html')
| -rw-r--r-- | js/tests/index.html | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/js/tests/index.html b/js/tests/index.html index 77a97cc1f..fab2ebc16 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -7,6 +7,46 @@ <!-- jQuery --> <script src="vendor/jquery.min.js"></script> + <script> + // Disable jQuery event aliases to ensure we don't accidentally use any of them + (function () { + var eventAliases = [ + 'blur', + 'focus', + 'focusin', + 'focusout', + 'load', + 'resize', + 'scroll', + 'unload', + 'click', + 'dblclick', + 'mousedown', + 'mouseup', + 'mousemove', + 'mouseover', + 'mouseout', + 'mouseenter', + 'mouseleave', + 'change', + 'select', + 'submit', + 'keydown', + 'keypress', + 'keyup', + 'error', + 'contextmenu', + 'hover', + 'bind', + 'unbind', + 'delegate', + 'undelegate' + ] + for (var i = 0; i < eventAliases.length; i++) { + $.fn[eventAliases[i]] = undefined + } + })() + </script> <!-- QUnit --> <link rel="stylesheet" href="vendor/qunit.css" media="screen"> |
