1 | <!DOCTYPE html |
---|
2 | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
5 | <head> |
---|
6 | <title>Opera focus bug test</title> |
---|
7 | <style type="text/css"> |
---|
8 | #link:focus |
---|
9 | { |
---|
10 | border: 1px solid; |
---|
11 | } |
---|
12 | </style> |
---|
13 | </head> |
---|
14 | <body> |
---|
15 | <input id="focus_editor" type="button" onclick="focusEditor();" value="focus editor"> |
---|
16 | <input id="focus_link" type="button" onmousedown="return false;" onclick="focusLink();" value="focus link"> |
---|
17 | <hr /> |
---|
18 | <iframe id="wysiwyg" src="javascript:void(0)" onload="onFrameLoad();"></iframe> |
---|
19 | <hr /> |
---|
20 | <a id="link" href="http://opera.com">link</a> |
---|
21 | <h1>Bug 1 reproducing procedures</h1> |
---|
22 | <ol> |
---|
23 | <li>After page load, click on the editable iframe to make sure cursor is blinking inside;</li> |
---|
24 | <li>Click on "focus link" button;</li> |
---|
25 | <ul> |
---|
26 | <li>Expected: Cursor stop blinking, link is border styled.</li> |
---|
27 | <li>Actual: Cursor keeps blinking, link is border styled.</li> |
---|
28 | </ul> |
---|
29 | </ol> |
---|
30 | <h1>Bug 2 reproducing procedures</h1> |
---|
31 | <ol> |
---|
32 | <li>After page load, Click on "focus link" button;</li> |
---|
33 | <li>Now click on "focus editor" button.</li> |
---|
34 | <ul> |
---|
35 | <li>Expected: Cursor now blinking inside iframe.</li> |
---|
36 | <li>Actual: Focus remains unchanged.</li> |
---|
37 | </ul> |
---|
38 | </ol> |
---|
39 | <script> |
---|
40 | var wysiwyg = document.getElementById("wysiwyg"), |
---|
41 | focus_editor_button = document.getElementById("focus_editor"), |
---|
42 | focus_link_button = document.getElementById("focus_link"); |
---|
43 | |
---|
44 | function onFrameLoad( evt ) |
---|
45 | { |
---|
46 | var doc = wysiwyg.contentWindow.document; |
---|
47 | doc.write('<body contenteditable="true">some text</body>'); |
---|
48 | doc.close(); |
---|
49 | } |
---|
50 | |
---|
51 | function focusEditor() |
---|
52 | { |
---|
53 | wysiwyg.contentWindow.document.body.focus(); |
---|
54 | } |
---|
55 | function focusLink() |
---|
56 | { |
---|
57 | document.getElementById("link").focus(); |
---|
58 | } |
---|
59 | |
---|
60 | </script> |
---|
61 | </body> |
---|
62 | </html> |
---|