<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1><code class="JS" xml:lang="en"><var>element</var>.scrollTop</code>, <code class="JS" xml:lang="en"><var>element</var>.scrollLeft</code> の設定器</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Opera 9.61</anchor> は <code class="DOMa" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">scrollTop</anchor></code> に値を設定したときの動作がおかしい気がします。
たまにしかちゃんと<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">スクロールしてくれません。</anchor></p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> ついでにいうと、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">スクロール・バー</anchor>の挙動が <code xmlns="http://www.w3.org/1999/xhtml" class="DOMe" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">mousedown</anchor></code>
とかに<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">事象聴取器</anchor>を登録してるときに変な感じ。うまく<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">スクロール</anchor>できなかったり。</comment-p></section><section><h1><code class="JS" xml:lang="en">window.scrollTop</code>, <code class="JS" xml:lang="en">window.scrollLeft</code></h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">window.scrollTop</anchor></code>, <code class="JS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">window.scrollLeft</anchor></code>
が存在するという説がありますが、手元のブラウザでは確認できませんでした。</p></section><section><h1>メモ</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <cite xml:lang="en">html/body scrollTop issue · Issue #242 · operasoftware/devopera</cite>
(<time>2015-02-11 16:47:27 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/operasoftware/devopera/issues/242">https://github.com/operasoftware/devopera/issues/242</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <cite xml:lang="en">2891 - document.documentElement.scrollTop always returns zero and can't be set - chromium - Monorail</cite>
(<time>2018-11-27 20:43:15 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugs.chromium.org/p/chromium/issues/detail?id=2891">https://bugs.chromium.org/p/chromium/issues/detail?id=2891</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <cite xml:lang="en">5991 – <strong>[</strong>CSSOM View<strong>]</strong> Implement standard behavior for scroll(Left/Top/Width/Height/To/By/ingElement)</cite>
(<time>2018-11-27 20:44:16 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugs.webkit.org/show_bug.cgi?id=5991">https://bugs.webkit.org/show_bug.cgi?id=5991</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <cite xml:lang="en">106133 – document.body.scrollTop &amp; document.documentElement.scrollTop differ cross-browser</cite>
(<time>2018-11-27 20:44:46 +09:00</time>)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://bugs.webkit.org/show_bug.cgi?id=106133">https://bugs.webkit.org/show_bug.cgi?id=106133</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> 
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要素</anchor>の高さと <code>ovrflow: scroll</code> を新たに設定したとき、
<code>scrollTop</code>
が
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Chrome</anchor>
だと
<n xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">0</n>
になるのですけど、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Gecko</anchor>
だと非 <n xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">0</n>
になります。
でも昔の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Gecko</anchor>
は
<n xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">0</n>
になってた気がして、挙動がかわったのか、
それとも何か複雑な条件に依存して決まるのかよくわからないのですが。
<time>2024-09-04T12:14:26.200Z</time></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <cite>DOM Element Scrolling</cite> (<time>2006-11-29 16:21:47 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://xulplanet.com/ndeakin/xul/specs/scrollspec.html">http://xulplanet.com/ndeakin/xul/specs/scrollspec.html</anchor-external>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor> <weak xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">2006-12-29 07:24:01 +00:00</weak>)</p></section></body></html>