11 Replies Latest reply on Jan 11, 2013 8:03 AM by Loic.Aigon

    Cursor issue, bug ?

    Loic.Aigon Adobe Community Professional

      Hi guys,

       

      I tried to mimick a handle button similar to the one you can find in the pages palette within InDesign. I was almost ok when I noticed a weird issue.

       

      When I call setCursor on mouseOver, the cursor is well replaced by my own image. BUT it only remains for a second or so a,d then the native cursor ( black arrow ) comes back and we have two cursors displayed.  On a standalone AIR app, the cursor behaves just fine. But in CS apps, it looks like either the app or the OS overrides the cursor at some time.

       

      Any idea ?

       

      TIA

       

      Loic

        • 1. Re: Cursor issue, bug ?
          MarkusVeith Level 1

          Hi,

           

          would be interested in a solution, too as i am facing the exact same issue.

           

          I am trying to have a handcursor on mouseover of some elements. However the handcursor is shown and then short after it reverts back to the black arrow cursor - though in my case it does not show both cursors it just changes the cursor again back.

           

          I have the following 2 methods:

           

          public function HandCursorOn():void{

              Mouse.cursor = MouseCursor.BUTTON;

          }

           

          public function HandCursorOff():void{

              Mouse.cursor = MouseCursor.AUTO;

          }

           

          Those methods are used in the according events:

           

          mouseOver="controller.HandCursorOn()" mouseOut="controller.HandCursorOff()"

           

           

          I meanwhile also found another approach - instead of using the mouse events set the following properties,

           

          useHandCursor="true" mouseChildren="false" buttonMode="true"

           

          but also this had the same issue.

           

          If anybody has an idea this would be very much help .

           

          Cheers,

           

               Markus Veith

          • 2. Re: Cursor issue, bug ?
            Yanwen Ju Level 2

            Tried on Win7 in Photoshop CS6, it works well on Button, Text and Image. Could you prove more information?

            • 3. Re: Cursor issue, bug ?
              Loic.Aigon Adobe Community Professional

              Hi guys,

               

              here is a video of what I get : http://megaswf.com/s/2533293

               

              On my side, I am trying to go through the CursorManager class :

               

               

              private function addCursor(event:Event = null ):void
              {
                             cursorID = CursorManager.setCursor( resizeCursorSymbol );
              }
                
              private function removeCursor( event:Event ):void
              {
                             CursorManager.removeCursor(cursorID);
              }
              

               

              addCursor is called on MouseOver.

              removeCursor is called on MouseOut

               

              Both listeners are attached to the button.

               

              FWIW

               

              Loic

              • 4. Re: Cursor issue, bug ?
                MarkusVeith Level 1

                I tested this on Mac OSX Lion and Mountain Lion. Indesign CS5 and CS5.5.

                The issue does not exist in Photoshop i only had it in Indesign the Versions mentioned above. Not tested in CS6.

                 

                It happens on Button, Label and Image Objects and some custom created mxml components.

                 

                Unfortunately i don't have a video showing this, but the video from Loic_aigon shows my issue except that i use the handcursor and in my case the handcursor is removed again and not staying as second cursor like in the video.

                 

                I cannot reproduce this issue everytime. Sometimes it also works correctly as it should. But in most cases it behaves like shown in the video from Loic_aigon.

                 

                In the cases where everything works like expected it was also working correctly until i closed indesign. So the "bug" either exists from start of the extension or it is generally working during the livetime of the extension.

                • 5. Re: Cursor issue, bug ?
                  Yanwen Ju Level 2

                  Tried on Win7, InDesign CS5/CS6. Loic aigon's code works well.

                  • 6. Re: Cursor issue, bug ?
                    Loic.Aigon Adobe Community Professional

                    don't have pc here. Could it be Mac OS related ?

                    • 7. Re: Cursor issue, bug ?
                      Yanwen Ju Level 2

                      It works well on Mac CS5.5 and  CS6.

                      • 8. Re: Cursor issue, bug ?
                        Loic.Aigon Adobe Community Professional

                        Ok I will review my code. Maybe I misused something.

                        • 9. Re: Cursor issue, bug ?
                          MarkusVeith Level 1

                          Meanwhile i created a small video that shows the issue on indesign cs5 mac osx mountainlion:

                          http://megaswf.com/s/253334

                          Cursor.gif

                          Animated gif created from the video above.

                           

                          See the cursor moving over the gear it shortly gets handcursor and then reverts back. hope videoquality is good enough.

                          The cursor should stay handcursor as long as mouse is over the gear.

                          • 10. Re: Cursor issue, bug ?
                            MarkusVeith Level 1

                            Did you find a solution for the cursor issue that works stable? For me it is still like it is shown in my post below in reply to Yanwen Ju.

                             

                            Would be interested if there exists something.

                            • 11. Re: Cursor issue, bug ?
                              Loic.Aigon Adobe Community Professional

                              Hi Markus,

                               

                              No I didn't find any. I just stopped trying. I also noticed the issue on htmlText links this morning. The hand cursor is there for half a second and then the black cursor overrides the hand.

                               

                              Loic