New issue
Advanced search Search tips

Issue 696056 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Spelling markers added to blurred <input> with multiple pending requests

Project Member Reported by xiaoche...@chromium.org, Feb 24 2017

Issue description

Repro case as a layout test:

<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script src="spellcheck_test.js"></script>
<input id=input>
<textarea id=textarea></textarea>
<script>
spellcheck_test(
    '<input>',
    document => {
      const input = document.querySelector('input');
      document.getSelection().setClipboardData('zz.');
      input.focus();
      document.execCommand('paste');
      document.execCommand('paste');
      input.blur();
    },
    '<input value="zz.zz.">',
    'Markers should not be added to INPUT without focus.');
</script>

The current implementation prevents adding marker to blurred <input> by calling SpellCheckerRequester::cancelCheck when <input> is blurred, which, however, only cancels the current request being handled. If the current request is not in the <input>, or the <input> has multiple pending requests, markers will still be added.
 
Labels: M-58
Status: Fixed (was: Assigned)

Sign in to add a comment