diff --git a/frame.js b/frame.js index d99d2c2f..9b366e71 100644 --- a/frame.js +++ b/frame.js @@ -764,7 +764,7 @@ Volcanos(chat.ONLAYOUT, {_init: function(can, target) { target = target||can._ro if (right) { layout.top = top+can.base.Min(height-target.offsetHeight, 0) } else if (rect.top-top-rect.height > top+height-rect.top) { - layout.top = top+can.base.Min(rect.top-target.offsetHeight, 0), height = rect.top-top + layout.top = can.base.Min(rect.top-target.offsetHeight, top) } } } diff --git a/lib/user.js b/lib/user.js index ea0df567..d38a8395 100644 --- a/lib/user.js +++ b/lib/user.js @@ -208,8 +208,9 @@ Volcanos("user", { can.core.CallFunc(cb, {event: can.request(event, {_handle: ice.TRUE})._event, button: button, data: data, list: list, args: args, input: action}) || action.cancel() }, _target: ui._target, _engine: function(event, can, button) { action.submit(event, can, button) }, }); - if (event && event.target) { can.onlayout.figure(event, can, ui._target) - can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, can.getHeaderHeight(can)) + if (event && event.target) { + can.onlayout.figure(event, can, ui._target) + can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, can.getHeaderHeight(can)) } else { can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) }) } can.onmotion.resize(can, ui._target), can.onmotion.delay(can, function() { action.focus() }, 300)