Bug 139473 - HTMLInputElement's value change does not trigger spellchecker
Summary: HTMLInputElement's value change does not trigger spellchecker
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2014-12-10 01:36 PST by Grzegorz Czajkowski
Modified: 2014-12-10 09:08 PST (History)
2 users (show)

See Also:

test case (415 bytes, text/html)
2014-12-10 01:36 PST, Grzegorz Czajkowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Czajkowski 2014-12-10 01:36:58 PST
Created attachment 243001 [details]
test case

Input element's value change (from script) does not invoke spell checker (unless user starts typing manually).

document.getElementById("spellTest").value = "TextThatShouldBeMarkedAsMisspelled ";

document.execCommand("InsertText", false, "TextThatShouldBeMarkedAsMisspelled ");

It seems that it worked in the past as EFL used to simulate typing using "inputElement.value = "misspelledString " in API test which started failing (bug 132982). Unfortunately, since limited history of API test failures finding a revision which caused it is unlikely to happen.

FYI, Safari as well as EFL's MiniBrowser do not trigger spellchecking on input.value changes.
Comment 1 Grzegorz Czajkowski 2014-12-10 01:47:03 PST
I am wondering whether it is something that we want to fix or it has been done by purpose?
It looks like we have inconsistency as execCommand(InsertText, ...) does spell check but input.value call does not.
Comment 2 Darin Adler 2014-12-10 09:08:32 PST
Yes, this was originally done on purpose. The idea is that setting a value from script is not the same thing as typing.

Whether this should be changed or not is a judgement call that requires more information. Do websites depend on one behavior or the other? Is there a standard for this? Do other web browsers consistently do this in a way that is different from what WebKit-based browsers do it?