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

Scrolling Spark Scroller using mouse wheel doesn't dispatch a change event on the VScrollBar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK 4.5 (Release)
    • Adobe Flex SDK Previous
    • Spark: Scroller
    • None
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Found in 4.5.0.16296.

      Steps to reproduce:
      1. Compile and run attached MXML file.
      2. Scroll the s:Scroller using the increment/decrement buttons (change event is dispatched).
      3. Scroll the s:Scroller by dragging the VSB thumb (change event is dispatched).
      4. Scroll the s:Scroller by clicking on the VSB track (change event is dispatched).
      5. Scroll the s:Scroller by using the mouse wheel (NO change event is dispatched)!

      Actual Results:
      VSB/Scroller isnt dispatching a change event when the VSB value is changed using the mouse wheel.

      Expected Results:
      change events.

      Workaround (if any):
      Instead of trying to listen for a "change" event on the VScrollBar, you can try listening for a "propertyChange" event on the viewport and then filter based on properties.

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx">

      <fx:Script>
      <![CDATA[
      import mx.events.PropertyChangeEvent;

      protected function vsb_propertyChangeHandler(evt:PropertyChangeEvent):void {
      switch (evt.property)

      { case "verticalScrollPosition": debbie.appendText(evt.newValue + " of " + evt.currentTarget.height + "\n"); break; }

      }

      protected function scr_creationCompleteHandler(evt:Event):void

      { scr.viewport.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, vsb_propertyChangeHandler); }

      ]]
      >
      </fx:Script>

      <s:HGroup x="20" y="20">
      <s:Scroller id="scr" width="100" height="100" creationComplete="scr_creationCompleteHandler(event);">
      <s:Group>
      <s:Rect width="100%" height="200">
      <s:fill>
      <s:LinearGradient rotation="45">
      <s:GradientEntry color="Red" />
      <s:GradientEntry color="Blue" />
      </s:LinearGradient>
      </s:fill>
      </s:Rect>
      </s:Group>
      </s:Scroller>

      <s:TextArea id="debbie" editable="false" />
      </s:HGroup>

      </s:Application>

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: