mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibWeb: Refresh text-<input> contents when pressing backspace or delete
Make sure to refresh the contents of text-<input> when pressing backspace or delete key. The methods 'handle_insert()' and 'handle_delete()' already had the call to 'm_browsing_context.active_document()->force_layout()' so let us also add it to 'handle_delete_character_after()'.
This commit is contained in:
parent
e2d797dd60
commit
4877e7593c
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,11 @@ void EditEventHandler::handle_delete_character_after(const DOM::Position& cursor
|
|||
builder.append(text.substring_view(cursor_position.offset() + code_point_length));
|
||||
node.set_data(builder.to_string());
|
||||
|
||||
// FIXME: When nodes are removed from the DOM, the associated layout nodes become stale and still
|
||||
// remain in the layout tree. This has to be fixed, this just causes everything to be recomputed
|
||||
// which really hurts performance.
|
||||
m_browsing_context.active_document()->force_layout();
|
||||
|
||||
m_browsing_context.did_edit({});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue