mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-24 07:19:37 +03:00
Fix wordwrap+horizontal scroll in textareas
svn path=/trunk/netsurf/; revision=2947
This commit is contained in:
parent
6358e6b87f
commit
68d314f3a9
@ -656,6 +656,9 @@ void browser_window_textarea_callback(struct browser_window *bw,
|
||||
text_box = text_box->next;
|
||||
assert(text_box);
|
||||
assert(char_offset <= text_box->length);
|
||||
/* Scroll back to the left */
|
||||
box_x += textarea->scroll_x;
|
||||
textarea->scroll_x = 0;
|
||||
}
|
||||
else
|
||||
char_offset = text_box->length + text_box->space;
|
||||
@ -1934,7 +1937,7 @@ bool ensure_caret_visible(struct box *textarea)
|
||||
scrolly = textarea->scroll_y;
|
||||
assert(textarea->gadget);
|
||||
/* Calculate the caret coordinates */
|
||||
cx = textarea->gadget->caret_pixel_offset;
|
||||
cx = textarea->gadget->caret_pixel_offset+textarea->gadget->caret_text_box->x;
|
||||
cy = textarea->gadget->caret_text_box->y;
|
||||
/* Ensure they are visible */
|
||||
if (!box_hscrollbar_present(textarea))
|
||||
|
Loading…
Reference in New Issue
Block a user