r60984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60983‎ | r60984 | r60985 >
Date:20:27, 12 January 2010
Author:thomasv
Status:ok
Tags:
Comment:
save scroll values for Opera and Chrome
Modified paths:
  • /trunk/extensions/ProofreadPage/proofread.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/proofread.js
@@ -416,12 +416,20 @@
417417 is_zoom = false;
418418 self.container_css = self.container_css.replace("overflow:hidden","overflow:auto");
419419 self.container_css = self.container_css.replace("cursor:crosshair","cursor:default");
 420+ sl = pr_container.scrollLeft;//save scrollbar value for Opera, Chrome
 421+ st = pr_container.scrollTop;
420422 pr_container.style.cssText = self.container_css;
 423+ pr_container.scrollLeft = sl;
 424+ pr_container.scrollTop = st;
421425 } else {
422426 is_zoom = true;
423427 self.container_css = self.container_css.replace("overflow:auto","overflow:hidden");
424428 self.container_css = self.container_css.replace("cursor:default","cursor:crosshair");
 429+ sl = pr_container.scrollLeft;
 430+ st = pr_container.scrollTop;
425431 pr_container.style.cssText = self.container_css;
 432+ pr_container.scrollLeft = sl;
 433+ pr_container.scrollTop = st;
426434 }
427435 }
428436 is_drag = false;

Status & tagging log