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/07 13:04:34 UTC

[royale-asjs] branch develop updated: fix an issue in iOS where a click on an internal element was behaving strangely and needs a second touch

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 63eb932  fix an issue in iOS where a click on an internal element was behaving strangely and needs a second touch
63eb932 is described below

commit 63eb932b6c49b40d91d07c4fd5a6b7cad0d4d21e
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Feb 7 14:04:27 2019 +0100

    fix an issue in iOS where a click on an internal element was behaving strangely and needs a second touch
---
 .../TourDeJewel/src/main/royale/ListPlayGround.mxml | 21 ++++++++++++---------
 .../projects/Jewel/src/main/resources/defaults.css  |  4 ++++
 .../itemRenderers/NavigationLinkItemRenderer.as     |  1 +
 .../src/main/sass/components/_itemRenderer.sass     |  2 ++
 .../Jewel/src/main/sass/components/_table.sass      |  2 ++
 5 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml b/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
index a16b6d7..f9ab9db 100644
--- a/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
+++ b/examples/royale/TourDeJewel/src/main/royale/ListPlayGround.mxml
@@ -157,15 +157,18 @@ limitations under the License.
 			<j:Card>
 				<html:H3 text="Jewel List With ItemRenderer"/>
 				<j:HGroup gap="3">
-					<j:List id="iconList" width="200" height="300" className="iconListItemRenderer" labelField="label">
-						<j:beads>
-							<js:ConstantBinding sourceID="listModel" sourcePropertyName="iconListData" destinationPropertyName="dataProvider" />
-							<j:AddListItemRendererForArrayListData/>
-							<j:RemoveListItemRendererForArrayListData/>
-							<j:UpdateListItemRendererForArrayListData/>
-							<j:RemoveAllItemRendererForArrayListData/>
-						</j:beads>
-					</j:List>
+					<j:VGroup gap="3">
+						<j:List id="iconList" width="200" height="300" className="iconListItemRenderer" labelField="label">
+							<j:beads>
+								<js:ConstantBinding sourceID="listModel" sourcePropertyName="iconListData" destinationPropertyName="dataProvider" />
+								<j:AddListItemRendererForArrayListData/>
+								<j:RemoveListItemRendererForArrayListData/>
+								<j:UpdateListItemRendererForArrayListData/>
+								<j:RemoveAllItemRendererForArrayListData/>
+							</j:beads>
+						</j:List>
+						<j:Label text="Click on render's icon will remove that renderer" multiline="true" width="200"/>
+					</j:VGroup>
 					<j:VGroup gap="3">
 						<j:Button text="change data" emphasis="{Button.PRIMARY}" click="changeListData()"/>
 						<j:Button text="Add item" click="addItem()"/>
diff --git a/frameworks/projects/Jewel/src/main/resources/defaults.css b/frameworks/projects/Jewel/src/main/resources/defaults.css
index cc104a7..ca72586 100644
--- a/frameworks/projects/Jewel/src/main/resources/defaults.css
+++ b/frameworks/projects/Jewel/src/main/resources/defaults.css
@@ -866,9 +866,11 @@ j|ImageButton {
   line-height: normal !important;
   overflow: hidden;
   cursor: auto;
+  pointer-events: none;
 }
 .jewel.item.selectable, .jewel.navigationlink.selectable, .jewel.tabbarbutton.selectable {
   cursor: pointer;
+  pointer-events: auto;
 }
 .jewel.item .fonticon, .jewel.navigationlink .fonticon, .jewel.tabbarbutton .fonticon {
   cursor: inherit;
@@ -3577,9 +3579,11 @@ j|Table {
   line-height: normal !important;
   overflow: hidden;
   cursor: auto;
+  pointer-events: none;
 }
 .jewel.tableitem.selectable {
   cursor: pointer;
+  pointer-events: auto;
 }
 .jewel.tableitem.with-childs {
   padding: 6px;
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/itemRenderers/NavigationLinkItemRenderer.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/itemRenderers/NavigationLinkItemRenderer.as
index 42a13e0..9c338ff 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/itemRenderers/NavigationLinkItemRenderer.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/itemRenderers/NavigationLinkItemRenderer.as
@@ -55,6 +55,7 @@ package org.apache.royale.jewel.itemRenderers
 			super();
 
 			typeNames = "jewel navigationlink";
+			addClass("selectable");
 		}
 
 		private var _href:String = "#";
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_itemRenderer.sass b/frameworks/projects/Jewel/src/main/sass/components/_itemRenderer.sass
index 98fd6e8..7d9d4aa 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_itemRenderer.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_itemRenderer.sass
@@ -31,9 +31,11 @@ $item-min-height: 34px
     line-height: normal !important
     overflow: hidden
     cursor: auto
+    pointer-events: none
 
     &.selectable
         cursor: pointer
+        pointer-events: auto
     
     .fonticon
         cursor: inherit
diff --git a/frameworks/projects/Jewel/src/main/sass/components/_table.sass b/frameworks/projects/Jewel/src/main/sass/components/_table.sass
index 8ed48c3..8924b85 100644
--- a/frameworks/projects/Jewel/src/main/sass/components/_table.sass
+++ b/frameworks/projects/Jewel/src/main/sass/components/_table.sass
@@ -123,9 +123,11 @@ j|Table
     line-height: normal !important
     overflow: hidden
     cursor: auto
+    pointer-events: none
     
     &.selectable
         cursor: pointer
+        pointer-events: auto
 
     &.with-childs
         padding: 6px