}
}
else
- _item_focus_next(sd, FOCUS_DIR_DOWN);
+ {
+ Item_Block *itb, *nib;
+ EINA_INLIST_FOREACH(sd->blocks, itb)
+ {
+ if (itb->realized)
+ {
+ Elm_Gen_Item *tmp = eina_list_data_get(itb->items);
+ while(tmp && tmp->item->block == itb)
+ {
+ if ((_item_focusable_search(&tmp, 1)) && (tmp->realized))
+ {
+ Evas_Coord x, y, w, h, sx, sy, sw, sh;
+ evas_object_geometry_get(VIEW(tmp), &x, &y, &w, &h);
+ evas_object_geometry_get(obj, &sx, &sy, &sw, &sh);
+ /* Item is included viewport */
+ if (ELM_RECTS_INCLUDE(sx, sy, sw, sh, x, y, w, h))
+ {
+ elm_object_item_focus_set(EO_OBJ(tmp), EINA_TRUE);
+ goto done;
+ }
+ }
+
+ tmp = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(tmp)->next);
+ }
+
+ nib = EINA_INLIST_CONTAINER_GET(EINA_INLIST_GET(itb)->next, Item_Block);
+ if (!nib || !nib->realized) goto done;
+ }
+ }
+done:
+ if (!sd->focused_item) _item_focus_next(sd, FOCUS_DIR_DOWN);
+ }
}
else
{