OSDN Git Service

auto scroll Y position.
authorAkira Saito <akrstjp@users.sourceforge.jp>
Tue, 3 Feb 2015 15:49:10 +0000 (00:49 +0900)
committerAkira Saito <akrstjp@users.sourceforge.jp>
Tue, 3 Feb 2015 15:49:10 +0000 (00:49 +0900)
app/views/hooks/_quick_edit_base_bottom.html.erb

index 8117712..13572fd 100644 (file)
@@ -2,7 +2,7 @@
 <div id="cursor" style="border: 1px dotted gray; position: absolute; display: none; opacity: 0.5;">&nbsp;</div>
 <script>
 //<![CDATA[
-var offsetY = /[\?&]offsetY=(\d+)[$&]/g.exec(location.href);
+var offsetY = /[?&]offsetY=(\d+).*/g.exec(location.href);
 if (offsetY) {
   window.scrollTo(0, offsetY[1]);
 }