diff --git a/haxe/ui/containers/ScrollView.hx b/haxe/ui/containers/ScrollView.hx index 6252e5ada..fe1a26ffa 100644 --- a/haxe/ui/containers/ScrollView.hx +++ b/haxe/ui/containers/ScrollView.hx @@ -118,9 +118,6 @@ private class EnsureVisible extends DefaultBehaviour { var scrollRect = new Rectangle(scrollview.screenLeft, scrollview.screenTop, scrollview.width, scrollview.height); var scrollRectFixed = scrollRect.copy(); - if (scrollview.layout == null) { - scrollview.validateNow(); - } var usableSize = scrollview.layout.usableSize; scrollRectFixed.width = usableSize.width; scrollRectFixed.height = usableSize.height; diff --git a/haxe/ui/focus/FocusManager.hx b/haxe/ui/focus/FocusManager.hx index caab96c0e..fb4b21b58 100644 --- a/haxe/ui/focus/FocusManager.hx +++ b/haxe/ui/focus/FocusManager.hx @@ -2,7 +2,6 @@ package haxe.ui.focus; import haxe.ui.backend.FocusManagerImpl; import haxe.ui.core.Component; -import haxe.ui.core.IScroller; import haxe.ui.core.Screen; import haxe.ui.events.MouseEvent; import haxe.ui.events.UIEvent; @@ -41,30 +40,10 @@ class FocusManager extends FocusManagerImpl { } private function onScreenMouseDown(event:MouseEvent) { - if (!enabled) { - return; - } - var list = Screen.instance.findComponentsUnderPoint(event.screenX, event.screenY); - list.reverse(); for (l in list) { - if (l.disabled || l.hidden || @:privateAccess l._isDisposed) { - continue; - } if (isOfType(l, IFocusable)) { - var focusable:IFocusable = cast l; - if (focusable.allowFocus) { - if (isOfType(l, IScroller)) { - var scroller:IScroller = cast l; - if (scroller.isScrollable) { - focus = focusable; - return; - } - } else { - focus = focusable; - return; - } - } + return; } } @@ -214,30 +193,18 @@ class FocusManager extends FocusManagerImpl { if (c.hidden == true) { return null; } - + if ((c is IFocusable)) { var f:IFocusable = cast c; if (considerAutoFocus == true && f.autoFocus == false) { return null; } if (f.allowFocus == true && f.disabled == false) { - if (isOfType(c, IScroller)) { - var scroller:IScroller = cast c; - if (scroller.isScrollable) { - if (f.focus == true) { - currentFocus = f; - } - if (list != null) { - list.push(f); - } - } - } else { - if (f.focus == true) { - currentFocus = f; - } - if (list != null) { - list.push(f); - } + if (f.focus == true) { + currentFocus = f; + } + if (list != null) { + list.push(f); } } }