OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 input { |
| 4 height: 26px; |
| 5 line-height: 29px; |
| 6 padding: 0 5px; |
| 7 border: none; |
| 8 border-bottom: 1px solid #888; |
| 9 outline: none; |
| 10 } |
| 11 </style> |
| 12 <div>Both inputs should be of the same size and the placeholder should be at the
same place.</div> |
| 13 <div id="console"></div> |
| 14 <input type="text" placeholder="placeholder"> |
| 15 <input type="text" placeholder="placeholder"> |
| 16 <script> |
| 17 window.jsTestIsAsync = true; |
| 18 |
| 19 var inputs = document.getElementsByTagName("input"); |
| 20 |
| 21 function checkInputs() |
| 22 { |
| 23 rect0 = inputs[0].getBoundingClientRect(); |
| 24 rect1 = inputs[1].getBoundingClientRect(); |
| 25 shouldBe("rect0.top", "rect1.top"); |
| 26 shouldBe("rect0.height", "rect1.height"); |
| 27 |
| 28 finishJSTest(); |
| 29 } |
| 30 |
| 31 inputs[1].focus(); |
| 32 // Forcing a layout in this frame makes the issue disappear. |
| 33 window.requestAnimationFrame(checkInputs); |
| 34 </script> |
| 35 <script src="../../resources/js-test.js"></script> |
OLD | NEW |