Fix #439
This commit is contained in:
parent
97bfd4b55b
commit
fc8295925c
@ -3807,11 +3807,20 @@
|
||||
thumb = a.firstChild;
|
||||
if (thumb.hidden) {
|
||||
rect = a.getBoundingClientRect();
|
||||
if (rect.top < 0) {
|
||||
d.body.scrollTop += rect.top - 42;
|
||||
}
|
||||
if (rect.left < 0) {
|
||||
d.body.scrollLeft += rect.left;
|
||||
if ($.engine === 'webkit') {
|
||||
if (rect.top < 0) {
|
||||
d.body.scrollTop += rect.top - 42;
|
||||
}
|
||||
if (rect.left < 0) {
|
||||
d.body.scrollLeft += rect.left;
|
||||
}
|
||||
} else {
|
||||
if (rect.top < 0) {
|
||||
d.documentElement.scrollTop += rect.top - 42;
|
||||
}
|
||||
if (rect.left < 0) {
|
||||
d.documentElement.scrollLeft += rect.left;
|
||||
}
|
||||
}
|
||||
return ImageExpand.contract(thumb);
|
||||
} else {
|
||||
|
||||
@ -2907,8 +2907,12 @@ ImageExpand =
|
||||
thumb = a.firstChild
|
||||
if thumb.hidden
|
||||
rect = a.getBoundingClientRect()
|
||||
d.body.scrollTop += rect.top - 42 if rect.top < 0
|
||||
d.body.scrollLeft += rect.left if rect.left < 0
|
||||
if $.engine is 'webkit'
|
||||
d.body.scrollTop += rect.top - 42 if rect.top < 0
|
||||
d.body.scrollLeft += rect.left if rect.left < 0
|
||||
else
|
||||
d.documentElement.scrollTop += rect.top - 42 if rect.top < 0
|
||||
d.documentElement.scrollLeft += rect.left if rect.left < 0
|
||||
ImageExpand.contract thumb
|
||||
else
|
||||
ImageExpand.expand thumb
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user