kbwood / datepick

jQuery Datepicker Plugin
87 stars 39 forks source link

Browser shouldn't scroll to calendar when it is inline, but only if it is popup #39

Open FdeQuillettes opened 8 years ago

FdeQuillettes commented 8 years ago

The browser will always scroll to the calendar on the datepick() call, even if it is inline. You can see an example if you make your window size very narrow (for intance 300px) and then loading http://keith-wood.name/datepick.html It will scroll to the calendar that is displayed in the introduction part.

jpaulinoger commented 8 years ago

I have the same problem, its really annoying. Any solution for this behavior?

xaja commented 5 years ago

remove in min version:

var g=b.find("a, :input");g.eq(Math.max(Math.min(f,g.length-1),0)).focus() 

remove in full version:

var focus = elem.find('a, :input');
focus.eq(Math.max(Math.min(index, focus.length - 1), 0)).focus();