Currently, the value of an input field gets cleared if there is no selected datalist suggestion when the enter key is pressed. The correct behavior is to leave the value of the input as-is.
Created attachment 348216 [details] Patch
Comment on attachment 348216 [details] Patch Clearing flags on attachment: 348216 Committed r235427: <https://trac.webkit.org/changeset/235427>
All reviewed patches have been landed. Closing bug.
<rdar://problem/43802050>
Seems unnecessary to use std::optional<String> since WTF::String already has a null value (distinct from the empty string). Typically we can use null string to mean no string, and we don’t have to involve std::optional. Unless we also need to use null string for some other valid value.
(In reply to Darin Adler from comment #5) > Seems unnecessary to use std::optional<String> since WTF::String already has > a null value (distinct from the empty string). Typically we can use null > string to mean no string, and we don’t have to involve std::optional. Unless > we also need to use null string for some other valid value. I will address this in a follow-up patch. I can't think of a case where we'd want to use the null string for a valid value.