mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibWeb: Bring back FIXME about using UTF-16 length in handle_insert()
It was accidentally removed in a8077f79cc
This commit is contained in:
committed by
Tim Ledbetter
parent
54d7314bd9
commit
bdaac6ce48
@@ -593,6 +593,7 @@ void FormAssociatedTextControlElement::handle_insert(String const& data)
|
||||
return;
|
||||
|
||||
String data_for_insertion = data;
|
||||
// FIXME: Cut by UTF-16 code units instead of raw bytes
|
||||
if (auto max_length = text_node->max_length(); max_length.has_value()) {
|
||||
auto remaining_length = *max_length - text_node->data().code_points().length();
|
||||
if (remaining_length < data.code_points().length()) {
|
||||
|
||||
Reference in New Issue
Block a user