Bug 139473

Summary: HTMLInputElement's value change does not trigger spellchecker
Product: WebKit Reporter: Grzegorz Czajkowski <g.czajkowski>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: darin, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=236937
Attachments:
Description Flags
test case none

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).

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

PASS:
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?