{
if ((sx >= vx) && (shy < sy)) //case: start handler is upside
{
+ const char *str;
+ Evas_Coord ph;
+ Evas_Coord indicator_h = 0;
+
+ str = edje_object_data_get(elm_layout_edje_get(ext_mod->popup), "indicator_maxh");
+ if (str)
+ indicator_h = (int)(atoi(str)
+ * elm_config_scale_get()
+ * elm_object_scale_get(ext_mod->popup)
+ / edje_object_base_scale_get(elm_layout_edje_get(ext_mod->popup)));
+
+ evas_object_geometry_get(ext_mod->popup, NULL, NULL, NULL, &ph);
+
y = shy;
w = x2 - x;
evas_object_move(ext_mod->popup, x + w/2, y);
GET_CTX_AVAI_DIR();
- if (dir != ELM_CTXPOPUP_DIRECTION_UP)
+
+ if ((dir == ELM_CTXPOPUP_DIRECTION_UP && indicator_h > 0 && y < indicator_h + ph)
+ || dir != ELM_CTXPOPUP_DIRECTION_UP)
{
y = sy - gap;
}