summaryrefslogtreecommitdiff
path: root/content/handlers
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-01 13:55:54 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-08-01 13:56:42 +0100
commitacee5faa3f03a229a6d7d14e042441a6af048faf (patch)
tree8259ec9b5166d61d5681660320353e390216fef8 /content/handlers
parent87177d8aa109206d131e0d80a2080ce55dab01c7 (diff)
downloadnetsurf-acee5faa3f03a229a6d7d14e042441a6af048faf.tar.gz
netsurf-acee5faa3f03a229a6d7d14e042441a6af048faf.tar.bz2
html_interaction.c: Default node to <HTML> node
In order to cope when an entire document is `visibility: hidden` we default to the <HTML> 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 <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/handlers')
-rw-r--r--content/handlers/html/html_interaction.c2
1 files changed, 1 insertions, 1 deletions
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 <HTML> */
union html_drag_owner drag_owner;
union html_selection_owner sel_owner;
bool click = mouse & (BROWSER_MOUSE_PRESS_1 | BROWSER_MOUSE_PRESS_2 |