Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-16744

Custom ToolTip improperly positioned via the ToolTipManager

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Adobe Flex SDK Previous
    • None
    • Tooltip Manager
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Browser: Firefox 2.x
      Language Found: English

    Description

      With a custom tooltip, as shown with the following code, the tooltip will "flicker". This is due to the mouse over handler being repeatedly invoked as shown by the stack at the bottom of the report. The ToolTipManager should position the tooltip such that the tooltip doesn't display over the component which issues the tooltip.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
      applicationComplete="init();">

      <mx:HBox id="outerBox" x="2000" y="2000" >
      <mx:Button label="Hover over me" toolTip="blah"/>
      </mx:HBox>

      <mx:Script>
      <![CDATA[
      import mx.managers.ToolTipManager;

      private function init():void

      { ToolTipManager.toolTipClass = BuggyToolTip; }

      ]]
      >
      </mx:Script>
      </mx:Application>

      package {
      import mx.containers.Canvas;
      import mx.controls.DataGrid;
      import mx.core.IToolTip;

      public class BuggyToolTip extends Canvas implements IToolTip {

      private var _dataGrid:DataGrid;
      private static var c:int = 0;

      public function BuggyToolTip()

      { super(); }

      override protected function createChildren():void {
      super.createChildren();
      _dataGrid = new DataGrid();

      if(c > 10)

      { trace(); }


      c++;
      addChild(_dataGrid);
      }

      public function get text():String

      { return null; }

      public function set text( value:String ):void {}
      }
      }

      Main Thread (Suspended)
      BuggyToolTip/createChildren
      mx.core::UIComponent/initialize
      mx.core::Container/initialize
      mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded
      mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt
      mx.managers::SystemChildrenList/addChild
      mx.managers::ToolTipManagerImpl/http://www.adobe.com/2006/flex/mx/internal::createTip
      mx.managers::ToolTipManagerImpl/http://www.adobe.com/2006/flex/mx/internal::targetChanged
      mx.managers::ToolTipManagerImpl/http://www.adobe.com/2006/flex/mx/internal::checkIfTargetChanged
      mx.managers::ToolTipManagerImpl/http://www.adobe.com/2006/flex/mx/internal::toolTipMouseOverHandler

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: