The css jquery element is a fixed element on the right. BUG animation in Firefox

I created a fiddle for my question:

fiddle

$('#move').click(function (e) {
    e.preventDefault();

    $(this).not('.up').animate({
        bottom: '50%'
    }, 1000, function () {
        $(this).addClass('up');
    });

    $('.up').animate({
        bottom: '0%'
    }, 1000, function () {
        $(this).removeClass('up');
    });
});

There is an error in Firefox (my version: 19.0.2).

When you press the red button, it goes to the right (the distance has exactly the width of the scroll bar). when it is on the right and you resize the window (or fiddle-frame), it bounces back.

Am I doing something wrong? Is there a good solution to fix it?

+5
source share
1 answer

Well, if you change the width property then it works fine even in firefox

try it

change

width:100px 

to

min-width:100px;

Hope this helps.

+11
source

All Articles