Jemt / Fit.UI

Fit.UI is a JavaScript based UI framework built on Object Oriented principles
http://fitui.org
GNU Lesser General Public License v3.0
19 stars 7 forks source link

iOS: DropDown with DetectBoundaries(true, true) + zoom + "scroll" = incorrect position #108

Open FlowIT-JIT opened 3 years ago

FlowIT-JIT commented 3 years ago

A DropDown configured with boundary detection relative to the boundaries of the viewport (DetectBoundaries(true, true)) does not work properly on iOS when pinching to zoom and "scrolling" the zoomed area a bit - this affects the position of the pull down menu. Boundary detection relative to scroll parent (DetectBoundaries(true)) works fine, and so does the DropDown without boundary detection at all. The need to detect boundaries relative to the viewport is mainly used to allow the pulldown menu to escape the boundaries of a scrollable container, which is not a very common use case, hence marking this issue as "minor bug".

var lv = new Fit.Controls.ListView();
for (var i = 0 ; i < 10 ; i++)
{
    var val = Fit.Data.CreateGuid();
    lv.AddItem(val, val);
};

var dd = new Fit.Controls.DropDown();
dd.SetPicker(lv);
dd.Width(100);
dd.DropDownMaxWidth(300);
dd.DetectBoundaries(true, true); // Detect edge collision relative to boundaries of viewport
dd.Render(document.body);

======================================== image

========================================

...