<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><section><h1>仕様書</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><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">CSSOM View Module</cite> (<time>2015-05-06 09:25:48 +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://dev.w3.org/csswg/cssom-view/#dom-element-scrollintoviewarg">http://dev.w3.org/csswg/cssom-view/#dom-element-scrollintoviewarg</anchor-external></li><li><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">CSSOM View Module</cite> (<time>2015-05-06 09:25:48 +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://dev.w3.org/csswg/cssom-view/#scroll-an-element-into-view">http://dev.w3.org/csswg/cssom-view/#scroll-an-element-into-view</anchor-external></li></ul></refs></section><section><h1>歴史</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> <cite xml:lang="en-us">element.scrollIntoView - MDC</cite> (<time>2009-01-01 15:46:53 +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://developer.mozilla.org/Ja/DOM:element.scrollIntoView">https://developer.mozilla.org/Ja/DOM:element.scrollIntoView</anchor-external></p><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> <cite xml:lang="ja-jp">scrollIntoView</cite> (<time>2009-01-24 16:00:19 +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://msdn.microsoft.com/ja-jp/library/cc428162.aspx">http://msdn.microsoft.com/ja-jp/library/cc428162.aspx</anchor-external></p><p><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:">WinIE7</anchor> では <code class="CSS" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">position</anchor>: <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">absolute</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>に
<code class="DOMm" xml:lang="en"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">scrollIntoView</anchor></code> しても、無視されます。</p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><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://suika.suikawiki.org/~wakaba/-temp/test/dom/window/view/scroll-into-view/">https://suika.suikawiki.org/~wakaba/-temp/test/dom/window/view/scroll-into-view/</anchor-external></comment-p><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">Web Applications 1.0 r5620 Move scrollIntoView() to CSSOM View and update the other scroll algorithm to use the CSSOM View definition.Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10533</cite>
( (<time>2010-10-14 05:18:00 +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://html5.org/tools/web-apps-tracker?from=5619&amp;to=5620">http://html5.org/tools/web-apps-tracker?from=5619&amp;to=5620</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">Web Applications 1.0 r5620 Move scrollIntoView() to CSSOM View and update the other scroll algorithm to use the CSSOM View definition.Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10533</cite>
( (<time>2010-10-14 05:18:00 +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://html5.org/tools/web-apps-tracker?from=5619&amp;to=5620">http://html5.org/tools/web-apps-tracker?from=5619&amp;to=5620</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> <cite xml:lang="en">elements: specify scrollIntoView arguments</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">andreastt</anchor>著, <time>2016-11-15 03:00:56 +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/w3c/webdriver/commit/71498af9b11a9ae4fecd13f8d8be64281914b560">https://github.com/w3c/webdriver/commit/71498af9b11a9ae4fecd13f8d8be64281914b560</anchor-external></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 xml:lang="en"><strong>[</strong>cssom-view<strong>]</strong> scrollIntoView(undefined) to be like true; change defaul…</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">zcorpan</anchor>著, <time>2017-09-11 23:25:21 +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/w3c/csswg-drafts/commit/232957f084dd40e63df136fe1c7f5b42ac642002">https://github.com/w3c/csswg-drafts/commit/232957f084dd40e63df136fe1c7f5b42ac642002</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> <cite xml:lang="en"><strong>[</strong>cssom-view<strong>]</strong> Change scrollIntoView(undefined) to be like true by zcorpan · Pull Request #1505 · w3c/csswg-drafts</cite>
(<time>2017-09-12 11:49:31 +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/w3c/csswg-drafts/pull/1505">https://github.com/w3c/csswg-drafts/pull/1505</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <cite xml:lang="en">Fix 'scroll an element into view' invocations</cite>
(<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">zcorpan</anchor>著, <time>2018-06-12 04:02:56 +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/whatwg/html/commit/c50e5286c189571e1c7b938110d3ba5515b0ee13">https://github.com/whatwg/html/commit/c50e5286c189571e1c7b938110d3ba5515b0ee13</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> <cite xml:lang="en">Change invocation of cssom-view &quot;scroll an element into view&quot; · Issue #464 · whatwg/html</cite>
(<time>2018-06-13 22:07: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://github.com/whatwg/html/issues/464">https://github.com/whatwg/html/issues/464</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> <cite xml:lang="en">scroll an element into view args by zcorpan · Pull Request #3131 · whatwg/html</cite>
(<time>2018-06-13 22:08:04 +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/whatwg/html/pull/3131">https://github.com/whatwg/html/pull/3131</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> 
<code>scrollIntoViewIfNeeded</code> 使ってるから <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> で動かないことあるんだけどどうして
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> は <code>scrollIntoViewIfNeeded</code> 実装しないのかねえ。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> ってずっと思ってるんだけど最近の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Mozilla</anchor> は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web互換性</anchor>どうでもいい感じなのかねえ。
それとももう体力がないのかねえ。。
<time>2024-09-26T11:26:03.000Z</time></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="16" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[16]</anchor-end> 
<code>scrollIntoViewIfNeeded</code> って IfNeeded だからスクロール位置変化しなくてもまあいいかって感じな使われ方してて、
あると便利だけどないと不便、っていうので <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> の利用者が不便を被ってるんだよね。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="17" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[17]</anchor-end> 
まあそれくらいならまだいいけど、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Chrome</anchor> や <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Safari</anchor> でしか動作確認してなくて
<code>scrollIntoViewIfNeeded</code>
の呼び出しでエラーになって <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> 
では動かない、っていうのが困るパターン。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="18" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[18]</anchor-end> 
<code>scrollIntoViewIfNeeded</code> がなければ <code>scrollIntoView</code> にフォールバックする、
ってパターンもあって、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> でも一見ちゃんと動くように見えるんだけど、
不要なときもスクロールされてしまうので、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Firefox</anchor> の利用者だけ不便を被っている。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="19" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[19]</anchor-end> 
という現状を知ってか知らずか <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Gecko</anchor> の中の人が <code>scrollIntoViewIfNeeded</code>
を実装しないという選択をし続けてる理由、なにかあるんだろうか。
実装が難しいってことないと思うんだけど。</p></section></body></html>