tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

input-maxlength-emoji.html (637B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Tests pasting an emoji in a text field with a maxlength attribute</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=252900">
      7 <input id="target" type="text" maxlength="10" />
      8 <script>
      9 test(function() {
     10  let target = document.getElementById("target");
     11  target.focus();
     12  document.execCommand("InsertHTML", false, "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ");
     13  assert_equals(target.value, "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€");
     14 }, "Emoji gets truncated due to maxlength attribute");
     15 </script>