This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new d722579 a temporary fix to solve an annoying issue with IOS devices
described here. We suffer it in Jewel ComboBox since in phones and tablets list
popup appears sliding from the bottom and gets hidden by keyboard. In
dektop/android behaviour is ok.
d722579 is described below
commit d7225792a4cb642d3406fa6fb4b6520db744b13c
Author: Carlos Rovira <[email protected]>
AuthorDate: Sun Feb 10 18:36:29 2019 +0100
a temporary fix to solve an annoying issue with IOS devices described here.
We suffer it in Jewel ComboBox since in phones and tablets list popup
appears sliding from the bottom and gets hidden by keyboard. In dektop/android
behaviour is ok.
---
.../org/apache/royale/jewel/beads/views/ComboBoxView.as | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
index b54e12b..5711eb1 100644
---
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
+++
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ComboBoxView.as
@@ -43,6 +43,7 @@ COMPILE::SWF
import org.apache.royale.jewel.supportClasses.ResponsiveSizes;
import
org.apache.royale.jewel.supportClasses.util.positionInsideBoundingClientRect;
import org.apache.royale.utils.UIUtils;
+ import org.apache.royale.utils.IOSUtils;
/**
* The ComboBoxView class creates the visual elements of the
org.apache.royale.jewel.ComboBox
@@ -192,12 +193,22 @@ COMPILE::SWF
_list = (_comboPopUp.view as ComboBoxPopUpView).list;
// _list.model = _comboPopUp.model;
- setTimeout(prepareForPopUp, 300);
-
COMPILE::JS
{
- window.addEventListener('resize', autoResizeHandler,
false);
+ // Fix temporary: when soft keyboard
opens in ios devices browser is not resized, so popup gets under the keyboard
+ // this fixes the issue on iPad for
now, but we need some better and more reliable way of doing this
+ if(IOSUtils.getIOSDevice() ==
IOSUtils.IOS_IPAD)
+ {
+ var fromTop:Number =
_textinput.element.getBoundingClientRect().top;
+ if(fromTop < 720)
+ {
+
_comboPopUp.positioner.style["padding-bottom"] = "310px";
+ }
+ }
+
+ window.addEventListener('resize',
autoResizeHandler, false);
}
+ setTimeout(prepareForPopUp, 300);
autoResizeHandler();
}