diff options
| author | Chris Rebert <[email protected]> | 2015-12-22 23:18:06 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2015-12-22 23:18:06 -0700 |
| commit | 50ce63b5e53ac4733d92a13b4a808e471722b57f (patch) | |
| tree | e2a7f203c27738a4c190ec0d6f4e262468b5def1 /js/tests/visual/modal.html | |
| parent | 40996725ce9e3c9244ae2ca3dd4e25f4558c8ff8 (diff) | |
| download | bootstrap-50ce63b5e53ac4733d92a13b4a808e471722b57f.tar.xz bootstrap-50ce63b5e53ac4733d92a13b4a808e471722b57f.zip | |
Add visual test for #18365
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1228802
Diffstat (limited to 'js/tests/visual/modal.html')
| -rw-r--r-- | js/tests/visual/modal.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/js/tests/visual/modal.html b/js/tests/visual/modal.html index 4342f0ce4..865511f97 100644 --- a/js/tests/visual/modal.html +++ b/js/tests/visual/modal.html @@ -127,12 +127,37 @@ </div> </div> + <div id="myModal2" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h4 class="modal-title" id="myModalLabel2">Modal Heading</h4> + </div> + <div class="modal-body"> + <ol> + <li>Ensure you're using Firefox.</li> + <li>Open a new tab and then switch back to this tab.</li> + <li>Click into this input: <input type="text" id="ff-bug-input"></li> + <li>Switch to the other tab and then back to this tab.</li> + </ol> + <p>Test result: <strong id="ff-bug-test-result"></strong></p> + </div> + </div> + </div> + </div> + <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> Launch demo modal </button> <button id="tall-toggle" class="btn btn-default">Toggle tall <body> content</button> <br><br> + <button class="btn btn-secondary btn-lg" data-toggle="modal" data-target="#myModal2"> + Launch Firefox bug test modal + </button> + (<a href="https://github.com/twbs/bootstrap/issues/18365">See Issue #18365</a>) + <br><br> <div id="tall" style="display: none;"> Tall body content to force the page to have a scrollbar. </div> @@ -149,12 +174,30 @@ <!-- JavaScript Test --> <script> +var firefoxTestDone = false +function reportFirefoxTestResult(result) { + if (!firefoxTestDone) { + $('#ff-bug-test-result') + .addClass(result ? 'text-success' : 'text-danger') + .text(result ? 'PASS' : 'FAIL') + } + firefoxTestDone = true +} + $(function () { $('.js-popover').popover() $('.js-tooltip').tooltip() $('#tall-toggle').click(function () { $('#tall').toggle() }) + $('#ff-bug-input').one('focus', function () { + $('#myModal2').on('focus', function () { + reportFirefoxTestResult(false) + }) + $('#ff-bug-input').on('focus', function () { + reportFirefoxTestResult(true) + }) + }) }) </script> |
