Bug 1890277: part 2) Add `require-trusted-types-for` directive to CSP parser, guarded...
[gecko.git] / editor / reftests / inline-table-editor-position-after-updating-table-size-from-input-event-listener.html
blobc6702c47c93d03bca97c76f9c2e6736b65b6b7ae
1 <!doctype html>
2 <html lang="en-US" class="reftest-wait">
3 <head>
4 <meta charset="utf-8">
5 <title>Inline table editor should be positioned correctly even if modified the table from an input event listener</title>
6 <script>
7 addEventListener("load", async () => {
8 const cell = document.querySelector("td");
9 document.body.focus();
10 getSelection().collapse(cell.firstChild, 0);
11 document.execCommand("enableObjectResizing", false, "true");
12 document.execCommand("enableInlineTableEditing", false, "true");
13 const nsITableEditor =
14 SpecialPowers.wrap(window).docShell.editingSession.
15 getEditorForWindow(window).QueryInterface(SpecialPowers.Ci.nsITableEditor);
16 document.body.addEventListener("input", event => {
17 cell.nextSibling.setAttribute("style", "width:100px");
18 }, {once: true});
19 nsITableEditor.insertTableColumn(1, true);
20 requestAnimationFrame(
21 () => requestAnimationFrame(
22 () => document.documentElement.removeAttribute("class")
25 }, {once: true});
26 </script>
27 </head>
28 <body contenteditable="">
29 <table border="1">
30 <td>Cell</td>
31 </table>
32 </body>
33 </html>