| <script> |
| if (window.layoutTestController) |
| layoutTestController.dumpEditingCallbacks(); |
| </script> |
| <p>This is a testcase for <a href="rdar://problem/4402375">rdar://problem/4402375</a> "REGRESSION (417.8-TOT): finding text sometimes also selects previous image (5127) (6451)"</p> |
| <hr> |
| <p>This test uses a right aligned image next to some left aligned text. The image should not be selected, and should not be included in the selection rect (you won't see the selection rect when you run this test manually).</p> |
| <div id="test" align="left"><img src="../resources/abe.png" align="right">This text should be selected.</div> |
| <script> |
| if (window.layoutTestController) |
| window.layoutTestController.dumpSelectionRect(); |
| var e = document.getElementById("test"); |
| var s = window.getSelection(); |
| // Select the text node. |
| s.setBaseAndExtent(e, 1, e, 2); |
| </script> |