CSS to suppress browser animation ???
01-14-2014, 09:42 AM,
Post: #1
Question  CSS to suppress browser animation ???
When you grab and drag an image with your mouse, such as the Treefort54 logo on the header of this forum - and the image is not dragable, letting go of the mouse button results in an animation of the image returning to its original place.

Is there some CSS or other means by which to suppress that animation?
Welcome to the dark side. Are you surprised we lied about having cookies?
01-14-2014, 10:22 AM,
Post: #2
RE: CSS to suppress browser animation ???
No. That's part of the OS and outside of the web page and its styles.
bedstuy Wrote:mocking a pair of $500 jeans is a form of class warfare... why do you hate my social status?
01-14-2014, 10:54 AM,
Post: #3
RE: CSS to suppress browser animation ???
Thanks
Welcome to the dark side. Are you surprised we lied about having cookies?
01-14-2014, 06:01 PM, (This post was last modified: 01-14-2014, 06:01 PM by tobobo.)
Post: #4
RE: CSS to suppress browser animation ???
roo ya bum. What's wrong with pointer-events: none?

http://codepen.io/anon/pen/sdwej
01-14-2014, 09:36 PM,
Post: #5
RE: CSS to suppress browser animation ???
That's not the same thing! That doesn't let you grab the image at all.
But I suppose it's close. And I didn't know about it.
bedstuy Wrote:mocking a pair of $500 jeans is a form of class warfare... why do you hate my social status?
01-15-2014, 03:20 AM,
Post: #6
RE: CSS to suppress browser animation ???
The draggable attribute might be closer to what you're looking for, but the cursor gets weird when you're dragging and I can't figure out how to change that.

http://codepen.io/anon/pen/mpijH
01-15-2014, 03:40 AM,
Post: #7
RE: CSS to suppress browser animation ???
Firefox doesn't seem to have the snap back animation.
My logic is infallible. Resistance is futile.
01-15-2014, 03:59 AM,
Post: #8
RE: CSS to suppress browser animation ???
Oaf
ClubbieClubbieClubbieClubbieClubbieClubbieClubbie
ClubbieClubbieClubbieClubbieClubbieClubbieClubbie
ClubbieClubbieClubbieClubbieClubbieClubbie
01-15-2014, 07:40 AM, (This post was last modified: 01-15-2014, 07:54 AM by FunkyRes.)
Post: #9
RE: CSS to suppress browser animation ???
(01-15-2014, 03:20 AM)tobobo Wrote: The draggable attribute might be closer to what you're looking for, but the cursor gets weird when you're dragging and I can't figure out how to change that.

http://codepen.io/anon/pen/mpijH

I don't want the draggable attribute, it has all kinds of side effects I don't want to code around.

Even without the draggable attribute, the dragstart, dragend, and dragover (amongst other) events fire. So you can make interfaces that allow dragging objects without the draggable attribute, using JS to act upon the action based on those events.

But the animation of the image returning to its original position then looks kind of funny. It still works but it looks funny.

EDIT - I'm talking about the jQuery draggable UI stuff, I don't want to use that. Just adding the attribute itself to an image does nothing. Images are draggable by default.
Welcome to the dark side. Are you surprised we lied about having cookies?


Forum Jump: