diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2008-04-08 12:40:05 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2008-04-08 12:40:05 +0000 |
commit | 84cd9a655f42642b3e6084e0844e6ca0d1da1a2e (patch) | |
tree | 74854e5a7b4961141670c7f46b01831dbb7a3e7e /desktop/browser.c | |
parent | 90e061c6a9cd8c762df0609406a9e4fac8e305c3 (diff) | |
download | netsurf-84cd9a655f42642b3e6084e0844e6ca0d1da1a2e.tar.gz netsurf-84cd9a655f42642b3e6084e0844e6ca0d1da1a2e.tar.bz2 |
Improve click handling in text inputs.
svn path=/trunk/netsurf/; revision=4087
Diffstat (limited to 'desktop/browser.c')
-rw-r--r-- | desktop/browser.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index ccc68a92f..3d8119262 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1446,6 +1446,8 @@ void browser_window_mouse_action_html(struct browser_window *bw, } else status = c->status_message; } + else if (mouse & BROWSER_MOUSE_CLICK_1) + selection_clear(bw->sel, true); break; case GADGET_TEXTBOX: case GADGET_PASSWORD: @@ -1461,7 +1463,7 @@ void browser_window_mouse_action_html(struct browser_window *bw, x - gadget_box_x, y - gadget_box_y); } - else if (text_box) { + if (text_box) { int pixel_offset; size_t idx; @@ -1482,6 +1484,8 @@ void browser_window_mouse_action_html(struct browser_window *bw, if (selection_dragging(bw->sel)) bw->drag_type = DRAGGING_SELECTION; } + else if (mouse & BROWSER_MOUSE_CLICK_1) + selection_clear(bw->sel, true); break; case GADGET_HIDDEN: /* not possible: no box generated */ |