event_mask |= COMPOSER_CSEF_RESIZE_EVENTS;
if (view->selected_widget == view->ewk_view) {
view->cs_bringin_to_ewk = true;
+ debug_log("Enable bringin to EWK");
}
view->cs_ready = true;
debug_log("Ready");
const int caret_scroller_top = caret_content_top - view->cs_scroll_pos;
const int caret_scroller_bottom = caret_content_bottom - view->cs_scroll_pos;
- if ((caret_scroller_top <= view->cs_rttb_height + caret_padding) ||
+ if (view->cs_bringin_to_ewk ||
+ (caret_scroller_top <= view->cs_rttb_height + caret_padding) ||
(caret_scroller_bottom >= view->cs_height - caret_padding)) {
int new_scroll_pos = 0;
- if (caret_scroller_top <= view->cs_rttb_height + caret_padding) {
+ if (view->cs_bringin_to_ewk) {
+ new_scroll_pos = view->cs_edge_scroll_pos;
+ } else if (caret_scroller_top <= view->cs_rttb_height + caret_padding) {
new_scroll_pos = caret_content_top - view->cs_rttb_height - caret_padding;
} else {
new_scroll_pos = caret_content_bottom - view->cs_height + caret_padding;
}
view->cs_bringin_to_ewk = false;
-
- } else if (prefer_bringin && view->cs_bringin_to_ewk) {
- if (view->cs_scroll_pos < view->cs_edge_scroll_pos) {
- composer_initial_view_cs_bring_in(view, view->cs_edge_scroll_pos);
- }
- view->cs_bringin_to_ewk = false;
}
debug_leave();