From acee5faa3f03a229a6d7d14e042441a6af048faf Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Thu, 1 Aug 2019 13:55:54 +0100 Subject: html_interaction.c: Default node to node In order to cope when an entire document is `visibility: hidden` we default to the node when interacting with the document to ensure we don't drop off the end of the box model without identifying at least one node to fire events at. This resolves #2658 Signed-off-by: Daniel Silverstone --- content/handlers/html/html_interaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content/handlers') diff --git a/content/handlers/html/html_interaction.c b/content/handlers/html/html_interaction.c index da4c67c40..985b325e2 100644 --- a/content/handlers/html/html_interaction.c +++ b/content/handlers/html/html_interaction.c @@ -382,7 +382,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw, int padding_left, padding_right, padding_top, padding_bottom; browser_drag_type drag_type = browser_window_get_drag_type(bw); union content_msg_data msg_data; - struct dom_node *node = NULL; + struct dom_node *node = html->layout->node; /* Default to the */ union html_drag_owner drag_owner; union html_selection_owner sel_owner; bool click = mouse & (BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_PRESS_2 | -- cgit v1.2.3