You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/02/12 18:28:34 UTC
[royale-asjs] branch develop updated: Make Jewel ComboBox popup
list open in tablet the same as in dektop,
so sliding from bottom only happens in mobile
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 7c40429 Make Jewel ComboBox popup list open in tablet the same as in dektop, so sliding from bottom only happens in mobile
7c40429 is described below
commit 7c404290c4a090b62e65f00e9de550a84f2f8e44
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Feb 12 19:28:26 2019 +0100
Make Jewel ComboBox popup list open in tablet the same as in dektop, so sliding from bottom only happens in mobile
---
.../projects/Jewel/src/main/resources/defaults.css | 9 ++-------
.../apache/royale/jewel/beads/views/ComboBoxView.as | 20 ++++++++++----------
.../Jewel/src/main/sass/components/_combobox.sass | 12 ++++++------
3 files changed, 18 insertions(+), 23 deletions(-)
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index 7268b22..54a62e7 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -410,12 +410,7 @@ j|ComboBox {
width: 98% !important;
}
}
-@media (min-width: 768px) and (max-width: 992px) {
- .combobox-popup .jewel.list {
- width: 70% !important;
- }
-}
-@media (max-width: 992px) {
+@media (max-width: 768px) {
.combobox-popup .jewel.list {
max-height: 240px !important;
}
@@ -423,7 +418,7 @@ j|ComboBox {
min-height: 48px !important;
}
}
-@media (min-width: 992px) {
+@media (min-width: 768px) {
.combobox-popup::before {
background-color: rgba(0, 0, 0, 0);
}
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 2414b11..6221296 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
@@ -197,14 +197,14 @@ COMPILE::SWF
{
// 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(BrowserInfo.current().formFactor == "iPad")
- {
- var fromTop:Number = _textinput.element.getBoundingClientRect().top;
- if(fromTop < 720)
- {
- _comboPopUp.positioner.style["padding-bottom"] = "310px";
- }
- }
+ // if(BrowserInfo.current().formFactor == "iPad")
+ // {
+ // var fromTop:Number = _textinput.element.getBoundingClientRect().top;
+ // if(fromTop < 720)
+ // {
+ // _comboPopUp.positioner.style["padding-bottom"] = "310px";
+ // }
+ // }
window.addEventListener('resize', autoResizeHandler, false);
}
@@ -297,7 +297,7 @@ COMPILE::SWF
/**
* Adapt the popup list to the right position taking into account
- * if we are in DESKTOP screen size or in PHONE/TABLET screen size
+ * if we are in DESKTOP/TABLET screen size or in PHONE screen size
*
* @langversion 3.0
* @playerversion Flash 10.2
@@ -313,7 +313,7 @@ COMPILE::SWF
var top:Number = (window.pageYOffset || document.documentElement.scrollTop) - (document.documentElement.clientTop || 0);
// Desktop width size
- if(outerWidth > ResponsiveSizes.DESKTOP_BREAKPOINT)
+ if(outerWidth > ResponsiveSizes.TABLET_BREAKPOINT)
{
//popup width needs to be set before position inside bounding client to work ok
_list.width = _textinput.width + _button.width;
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass b/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass
index 4a1f6e1..961b96e 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_combobox.sass
@@ -132,12 +132,12 @@ $combobox-item-min-heigh: 34px
.jewel.list
width: 98% !important
-@media (min-width: $tablet) and (max-width: $desktop)
- .combobox-popup
- .jewel.list
- width: 70% !important
+// @media (min-width: $tablet) and (max-width: $desktop)
+// .combobox-popup
+// .jewel.list
+// width: 70% !important
-@media (max-width: $desktop)
+@media (max-width: $tablet)
.combobox-popup
.jewel.list
max-height: ( $combobox-item-min-heigh + 14 ) * 5 !important
@@ -145,7 +145,7 @@ $combobox-item-min-heigh: 34px
.jewel.item
min-height: $combobox-item-min-heigh + 14 !important //this should match $item-min-heigh in _itemrenderer.sass
-@media (min-width: $desktop)
+@media (min-width: $tablet)
.combobox-popup
&::before
background-color: rgba($combobox-popup-overlay-color, 0)