Jump to content
GreenSock

Palke

Strange behaviour with Observer

Moderator Tag

Recommended Posts

Hello. I am playing around with Observer plugin and noticed something odd that I am uncertain if is intended - or bug.

 

While using "pointer" setting with Observer, "right-mouse-click" causes the events to fire simply by moving the mouse over the document.

 

Steps to replicate:

 

1. Open the Observer demo CodePen

2. Right-click on the demo content (context menu opens)

3. Left-click back on the demo content to close context menu

4. Move mouse up and down

 

I believe the items shouldn't get animated. If this is indeed intended, how can we disable this easy?

 

Thanks!

See the Pen XWzRraJ by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

 

Hello @Palke - welcome to the GreenSock forum.

 

I myself can not replicate the behaviour you mentioned with the instructions you gave - on Windows 11 neither in the latest Firefox, Chrome or Opera - so this might be something browser or OS specific. I think, adding some information about the browser and OS you are using might help the Admins find out what's causing that.

 

  • Like 1
Link to comment
Share on other sites

Hi @akapowl

 

Thanks for testing. I am using Mac (macOS Monterey) and I can see this behaviour in Firefox, Chrome and also Safari, all latest.

 

  • Like 1
Link to comment
Share on other sites

Hi,

 

I can replicate the behaviour in both latest Chrome and Firefox on Ubuntu 20 and 22. In fact in Firefox you don't need to close the context menu to see it happening.

 

This is Chrome:

https://i.imgur.com/AS192VX.mp4

 

This is Firefox:

https://i.imgur.com/pVMSWWt.mp4

 

We'll look into this, please stand by.

Happy Tweening!

  • Like 1
Link to comment
Share on other sites

Thanks for reporting that. Sorry about any confusion. Is this [upcoming release] version better?: 

https://assets.codepen.io/16327/Observer.min.js

 

(you may need to clear your cache)

 

In the meantime, a workaround would be: 

onPress: self => {
  if (self.event.button) {
    self.disable();
    self.enable();
  }
}

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×