Opened 6 years ago

Closed 6 years ago

#9394 closed bug (worksforme)

Page jump to the top after changed programmatically via the value method.

Reported by: josephys Owned by: josephys
Priority: minor Milestone: none
Component: ui.slider Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:

Description

Hi,

Chromium: v27.0.1453.93

OS: Linux Fedora 19

Jquery: 2.0.2

Jqueryui: 1.10.3

I searched over the internet and found no answer to this bug. After changed programmatically the value using

$( ".selector" ).slider( "value", 55 );

value method, the page jumps to the top. I tried to fix it using the change event applying:

$( ".selector" ).slider({

change:

function( event, ui ) {

event.preventDefault(); event.stopPropagation();

}

});

The workaround was using the "value option" instead of "value method"

$( ".selector" ).slider( "option", "value", 55 );

Thanks,

Change History (3)

comment:1 Changed 6 years ago by tj.vantoll

Owner: set to josephys
Status: newpending

Hi josephys,

Thanks for taking the time to contribute to the jQuery UI project. I'm not seeing the issue you're describing: http://jsfiddle.net/tj_vantoll/fwStx/.

Could you please alter my test case to show the issue you're experiencing?

Thanks.

comment:2 Changed 6 years ago by josephys

Status: pendingnew

Hi again,

Bubbling comes with the option animate.

Test case is here: http://jsfiddle.net/fwStx/1/

comment:3 Changed 6 years ago by Scott González

Resolution: worksforme
Status: newclosed

I'm not seeing this happen. I see a very small jump up from the bottom because you're hiding an element right before the animation, but the page is definitely not jumping to the top for me.

Since we can't reproduce this, there's nothing we can do. I'd suggest asking for help on the forums or Stack Overflow to see if you can find anyone else that can reproduce this and help you track down the problem.

Note: See TracTickets for help on using tickets.