ハ!私はそれを考え出した!
問題は、入力が表示領域外にある場合、ブラウザがdivをスクロールして表示されることです。#coda-slider、またはそれを呼び出すIDにはスクロールバーがないため、何が起こっているのかを確認したり、手動で元に戻したりすることはできません。
Note, that coda-slider does not alter the scroll position, so even if the coda-slider moves, it is still offset by the scroll offset.
However, you can simply set the scroll position to 0 every time an input gets focus whenever the #coda-slider changes scroll position. Then you can figure out which tab that input is in and trigger coda to do it's magic. You might as well scrollTop(0) as well, in case your content is different heights.
$('#coda-slider-1').scroll( function() {
$('#coda-slider-1').scrollLeft(0);
$('#coda-slider-1').scrollTop(0);
});
$('input').focus( function() {
var tabindex = $(this).parents('.panel').prevAll('.panel').size() + 1;
$('.tab' +tabindex +' > a').trigger('click');
});
Example here:
http://jsfiddle.net/u99AJ/
Update:
Something even stranger is going on with Safari. This does not work.
Update2:
The order of focus and scroll seems to have a strange effect in Safari. Example updated for cross-browser support:
http://jsfiddle.net/u99AJ/4/
Update3:
Added code (in jsfiddle example below) to workaround coda-slider bug where animate
is still called even when clicking on the same tab. This may cause the tab switch to seem to delay in some cases, especially when tabbing quickly through the inputs.
http://jsfiddle.net/u99AJ/7/