flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Chira (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-33604) spark DataGrid causes a tooltip (text: "<dataTip>") to appear for its typical item renderer although mouse not over data grid
Date Thu, 04 Jul 2013 09:42:20 GMT
Mihai Chira created FLEX-33604:

             Summary: spark DataGrid causes a tooltip (text: "<dataTip>") to appear
for its typical item renderer although mouse not over data grid
                 Key: FLEX-33604
                 URL: https://issues.apache.org/jira/browse/FLEX-33604
             Project: Apache Flex
          Issue Type: Bug
          Components: Cell Renderers, Spark: DataGrid, Tooltip Manager
    Affects Versions: Apache Flex 4.9.0
         Environment: Tested on a Win 8 and a Win 7 system.
            Reporter: Mihai Chira
            Priority: Critical

Run the application below and click the second tab.

Actual result: a tooltip appears next to the mouse saying "<dataTip>".
Desired result: no such tooltip should appear.

Notes: from what I could tell, it happens because the data grid creates its typical item renderer
during a measure() call; the renderer, through the validateNow() function, registers itself
with the TooltipManager; in that function ("registerToolTip()"), the latter checks if the
mouse is currently over the target. In reality it's not, but because all this happens during
measure, the parents of the renderer haven't been measured yet, so its localToGlobal() function
returns wrong data. This happens to indicate that the current mouse position is over the renderer.
Therefore the tooltip is shown.

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
			import mx.collections.ArrayCollection;
			import spark.components.TabBar;
			import spark.events.IndexChangeEvent;
			private static const STATE1_ID:String = "firstTab";
			private static const STATE2_ID:String = "secondTab";
			private static const STATES:ArrayCollection = new ArrayCollection([STATE1_ID, STATE2_ID]);
			protected function onTabChange(event:IndexChangeEvent):void
				var buttonBar:TabBar = event.target as TabBar;
				if (!buttonBar)
				switch (buttonBar.selectedItem)
					case STATE1_ID:
						this.currentState = "tab1";
					case STATE2_ID:
						this.currentState = "tab2";
		<s:State id="firstTab" name="tab1"/>
		<s:State id="secondTab" name="tab2"/>
	<s:VGroup width="100%" height="100%" clipAndEnableScrolling="true">
		<s:TabBar id="dataGridNavigation" width="100%" dataProvider="{STATES}" change="onTabChange(event)"/>
		<s:Label text="Welcome! Please click on the second tab and don't move the mouse." includeIn="tab1"/>
		<local:DataGridShowingOutOfPlaceTooltip width="100%" height="100%" includeIn="tab2"/>


and the "DataGridShowingOutOfPlaceTooltip" component:

<?xml version="1.0" encoding="utf-8"?>
<s:VGroup xmlns:fx="http://ns.adobe.com/mxml/2009" 
			import spark.skins.spark.DefaultGridItemRenderer;
		<s:ArrayCollection id="someObjects">
			<fx:Object description="obj desc1" note="note1" hours="1"/>
			<fx:Object description="obj desc2" note="note2" hours="2"/>
			<fx:Object description="obj desc3" note="note3" hours="3"/>
	<s:DataGrid dataProvider="{someObjects}"
				width="100%" height="100%"
				<s:GridColumn headerText="Note"
				<s:GridColumn headerText="Description"
				<s:GridColumn headerText="Hours"

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message