Commit b144f0d0 authored by Oleg Korshul's avatar Oleg Korshul

mobile (web): keyboard hide/show bugs

parent aa643059
...@@ -127,9 +127,9 @@ function (window, undefined) ...@@ -127,9 +127,9 @@ function (window, undefined)
{ {
return this.WB.element; return this.WB.element;
}; };
CMobileDelegateEditorCell.prototype.GetObjectTrack = function(x, y, page, bSelected) CMobileDelegateEditorCell.prototype.GetObjectTrack = function(x, y, page, bSelected, bText)
{ {
return this.WB.getWorksheet().objectRender.controller.isPointInDrawingObjects3(x, y, page, bSelected); return this.WB.getWorksheet().objectRender.controller.isPointInDrawingObjects3(x, y, page, bSelected, bText);
}; };
CMobileDelegateEditorCell.prototype.GetSelectionRectsBounds = function() CMobileDelegateEditorCell.prototype.GetSelectionRectsBounds = function()
{ {
...@@ -168,8 +168,9 @@ function (window, undefined) ...@@ -168,8 +168,9 @@ function (window, undefined)
var _mode = AscCommon.MobileTouchContextMenuType.None; var _mode = AscCommon.MobileTouchContextMenuType.None;
var _controller = this.WB.getWorksheet().objectRender.controller; var _controller = this.WB.getWorksheet().objectRender.controller;
var _selection = this.WB.GetSelectionRectsBounds();
if (!_controller.Is_SelectionUse()) if (!_controller.Is_SelectionUse() && !_selection)
_mode = AscCommon.MobileTouchContextMenuType.Target; _mode = AscCommon.MobileTouchContextMenuType.Target;
if (_controller.Get_SelectionBounds()) if (_controller.Get_SelectionBounds())
...@@ -431,6 +432,7 @@ function (window, undefined) ...@@ -431,6 +432,7 @@ function (window, undefined)
var isPreventDefault = false; var isPreventDefault = false;
switch (this.Mode) switch (this.Mode)
{ {
case AscCommon.MobileTouchMode.Select: // in cell select too
case AscCommon.MobileTouchMode.InlineObj: case AscCommon.MobileTouchMode.InlineObj:
case AscCommon.MobileTouchMode.FlowObj: case AscCommon.MobileTouchMode.FlowObj:
case AscCommon.MobileTouchMode.Zoom: case AscCommon.MobileTouchMode.Zoom:
...@@ -442,7 +444,7 @@ function (window, undefined) ...@@ -442,7 +444,7 @@ function (window, undefined)
case AscCommon.MobileTouchMode.None: case AscCommon.MobileTouchMode.None:
case AscCommon.MobileTouchMode.Scroll: case AscCommon.MobileTouchMode.Scroll:
{ {
isPreventDefault = this.CheckObjectTrackBefore(); isPreventDefault = !this.CheckObjectText();
break; break;
} }
default: default:
...@@ -671,6 +673,7 @@ function (window, undefined) ...@@ -671,6 +673,7 @@ function (window, undefined)
var isPreventDefault = false; var isPreventDefault = false;
switch (this.Mode) switch (this.Mode)
{ {
case AscCommon.MobileTouchMode.Select: // in cell select too
case AscCommon.MobileTouchMode.Scroll: case AscCommon.MobileTouchMode.Scroll:
case AscCommon.MobileTouchMode.InlineObj: case AscCommon.MobileTouchMode.InlineObj:
case AscCommon.MobileTouchMode.FlowObj: case AscCommon.MobileTouchMode.FlowObj:
...@@ -742,7 +745,7 @@ function (window, undefined) ...@@ -742,7 +745,7 @@ function (window, undefined)
this.DragSelect = 0; this.DragSelect = 0;
this.Mode = AscCommon.MobileTouchMode.None; this.Mode = AscCommon.MobileTouchMode.None;
this.delegate.Drawing_OnMouseUp(_e); this.delegate.Drawing_OnMouseUp(_e);
AscCommon.stopEvent(e); //AscCommon.stopEvent(e);
break; break;
} }
default: default:
......
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
CMobileDelegateSimple.prototype.SetZoom = function(_value) CMobileDelegateSimple.prototype.SetZoom = function(_value)
{ {
}; };
CMobileDelegateSimple.prototype.GetObjectTrack = function(x, y, page, bSelected) CMobileDelegateSimple.prototype.GetObjectTrack = function(x, y, page, bSelected, bText)
{ {
return false; return false;
}; };
...@@ -217,9 +217,9 @@ ...@@ -217,9 +217,9 @@
{ {
this.HtmlPage.m_oApi.zoom(_value); this.HtmlPage.m_oApi.zoom(_value);
}; };
CMobileDelegateEditor.prototype.GetObjectTrack = function(x, y, page, bSelected) CMobileDelegateEditor.prototype.GetObjectTrack = function(x, y, page, bSelected, bText)
{ {
return this.LogicDocument.DrawingObjects.isPointInDrawingObjects3(x, y, page, bSelected); return this.LogicDocument.DrawingObjects.isPointInDrawingObjects3(x, y, page, bSelected, bText);
}; };
CMobileDelegateEditor.prototype.GetContextMenuType = function() CMobileDelegateEditor.prototype.GetContextMenuType = function()
{ {
...@@ -842,6 +842,14 @@ ...@@ -842,6 +842,14 @@
global_mouseEvent.KoefPixToMM = 1; global_mouseEvent.KoefPixToMM = 1;
return bResult; return bResult;
}; };
CMobileTouchManagerBase.prototype.CheckObjectText = function()
{
var pos = this.delegate.ConvertCoordsFromCursor(global_mouseEvent.X, global_mouseEvent.Y);
global_mouseEvent.KoefPixToMM = 5;
var bResult = this.delegate.GetObjectTrack(pos.X, pos.Y, pos.Page, false, true);
global_mouseEvent.KoefPixToMM = 1;
return bResult;
};
// в мобильной версии - меньше, чем "по ширине" - не делаем // в мобильной версии - меньше, чем "по ширине" - не делаем
CMobileTouchManagerBase.prototype.CheckZoomCriticalValues = function(zoomMin) CMobileTouchManagerBase.prototype.CheckZoomCriticalValues = function(zoomMin)
......
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
H : (this.HtmlPage.SlideScrollMAX - this.HtmlPage.SlideScrollMIN + _controlH) H : (this.HtmlPage.SlideScrollMAX - this.HtmlPage.SlideScrollMIN + _controlH)
}; };
}; };
CMobileDelegateEditorPresentation.prototype.GetObjectTrack = function(x, y, page, bSelected) CMobileDelegateEditorPresentation.prototype.GetObjectTrack = function(x, y, page, bSelected, bText)
{ {
return this.LogicDocument.Slides[this.LogicDocument.CurPage].graphicObjects.isPointInDrawingObjects3(x, y, page, bSelected); return this.LogicDocument.Slides[this.LogicDocument.CurPage].graphicObjects.isPointInDrawingObjects3(x, y, page, bSelected, bText);
}; };
CMobileDelegateEditorPresentation.prototype.GetSelectionRectsBounds = function() CMobileDelegateEditorPresentation.prototype.GetSelectionRectsBounds = function()
{ {
...@@ -120,17 +120,18 @@ ...@@ -120,17 +120,18 @@
}; };
CMobileDelegateEditorPresentation.prototype.GetContextMenuType = function() CMobileDelegateEditorPresentation.prototype.GetContextMenuType = function()
{ {
var _mode = AscCommon.MobileTouchContextMenuType.None; var _mode = AscCommon.MobileTouchContextMenuType.Slide;
var _controller = this.LogicDocument.Slides[this.LogicDocument.CurPage].graphicObjects; var _controller = this.LogicDocument.Slides[this.LogicDocument.CurPage].graphicObjects;
var _elementsCount = _controller.selectedObjects.length;
if (!_controller.Is_SelectionUse()) if (!_controller.Is_SelectionUse() && _elementsCount > 0)
_mode = AscCommon.MobileTouchContextMenuType.Target; _mode = AscCommon.MobileTouchContextMenuType.Target;
if (_controller.Get_SelectionBounds()) if (_controller.Get_SelectionBounds())
_mode = AscCommon.MobileTouchContextMenuType.Select; _mode = AscCommon.MobileTouchContextMenuType.Select;
if (_mode == 0 && _controller.getSelectedObjectsBounds()) if (_mode == AscCommon.MobileTouchContextMenuType.Slide && _controller.getSelectedObjectsBounds())
_mode = AscCommon.MobileTouchContextMenuType.Object; _mode = AscCommon.MobileTouchContextMenuType.Object;
return _mode; return _mode;
...@@ -344,7 +345,7 @@ ...@@ -344,7 +345,7 @@
case AscCommon.MobileTouchMode.None: case AscCommon.MobileTouchMode.None:
case AscCommon.MobileTouchMode.Scroll: case AscCommon.MobileTouchMode.Scroll:
{ {
isPreventDefault = this.CheckObjectTrackBefore(); isPreventDefault = !this.CheckObjectText();
break; break;
} }
default: default:
...@@ -656,6 +657,7 @@ ...@@ -656,6 +657,7 @@
var isPreventDefault = false; var isPreventDefault = false;
switch (this.Mode) switch (this.Mode)
{ {
case AscCommon.MobileTouchMode.Select:
case AscCommon.MobileTouchMode.Scroll: case AscCommon.MobileTouchMode.Scroll:
case AscCommon.MobileTouchMode.InlineObj: case AscCommon.MobileTouchMode.InlineObj:
case AscCommon.MobileTouchMode.FlowObj: case AscCommon.MobileTouchMode.FlowObj:
...@@ -1026,6 +1028,7 @@ ...@@ -1026,6 +1028,7 @@
fadeScrollbars: true, fadeScrollbars: true,
scrollX : true, scrollX : true,
scroller_id : this.iScrollElement, scroller_id : this.iScrollElement,
eventsElement : this.eventsElement,
bounce : true bounce : true
}); });
...@@ -1040,6 +1043,8 @@ ...@@ -1040,6 +1043,8 @@
this.IsTouching = true; this.IsTouching = true;
this.MoveAfterDown = false; this.MoveAfterDown = false;
AscCommon.g_inputContext.enableVirtualKeyboard();
var _e = e.touches ? e.touches[0] : e; var _e = e.touches ? e.touches[0] : e;
AscCommon.check_MouseDownEvent(_e, false); AscCommon.check_MouseDownEvent(_e, false);
...@@ -1051,10 +1056,8 @@ ...@@ -1051,10 +1056,8 @@
this.Mode = AscCommon.MobileTouchMode.Scroll; this.Mode = AscCommon.MobileTouchMode.Scroll;
this.iScroll._start(e); this.iScroll._start(e);
if (e.preventDefault) AscCommon.stopEvent(e);
e.preventDefault(); AscCommon.g_inputContext.HtmlArea.readOnly = true;
else
e.returnValue = false;
return false; return false;
}; };
CMobileTouchManagerThumbnails.prototype.onTouchMove = function(e) CMobileTouchManagerThumbnails.prototype.onTouchMove = function(e)
...@@ -1144,6 +1147,7 @@ ...@@ -1144,6 +1147,7 @@
this.CheckContextMenuTouchEnd(isCheckContextMenuMode); this.CheckContextMenuTouchEnd(isCheckContextMenuMode);
AscCommon.stopEvent(e); AscCommon.stopEvent(e);
AscCommon.g_inputContext.HtmlArea.readOnly = false;
return false; return false;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment