code review by zhifeng.liang : do feature v3.2.5
Showing
2 changed files
with
16 additions
and
8 deletions
@@ -5537,7 +5537,9 @@ function disableNumEdit() { | @@ -5537,7 +5537,9 @@ function disableNumEdit() { | ||
5537 | 5537 | ||
5538 | 5538 | ||
5539 | function show(html, cb) { | 5539 | function show(html, cb) { |
5540 | - var scrollPosition = [ | 5540 | + var $html = $('html, body'); |
5541 | + | ||
5542 | + /*var scrollPosition = [ | ||
5541 | document.documentElement.scrollLeft || document.body.scrollLeft, | 5543 | document.documentElement.scrollLeft || document.body.scrollLeft, |
5542 | document.documentElement.scrollTop || document.body.scrollTop | 5544 | document.documentElement.scrollTop || document.body.scrollTop |
5543 | ], | 5545 | ], |
@@ -5547,7 +5549,7 @@ function show(html, cb) { | @@ -5547,7 +5549,7 @@ function show(html, cb) { | ||
5547 | $html.data('previous-overflow', $html.css('overflow')); | 5549 | $html.data('previous-overflow', $html.css('overflow')); |
5548 | $html.css('overflow', 'hidden'); | 5550 | $html.css('overflow', 'hidden'); |
5549 | $html.css('height', '100%'); | 5551 | $html.css('height', '100%'); |
5550 | - window.scrollTo(scrollPosition[0], scrollPosition[1]); | 5552 | + window.scrollTo(scrollPosition[0], scrollPosition[1]);*/ |
5551 | 5553 | ||
5552 | if (html) { | 5554 | if (html) { |
5553 | $chosePanel.html(html); | 5555 | $chosePanel.html(html); |
@@ -5563,13 +5565,15 @@ function show(html, cb) { | @@ -5563,13 +5565,15 @@ function show(html, cb) { | ||
5563 | 5565 | ||
5564 | //隐藏当前Panel | 5566 | //隐藏当前Panel |
5565 | function hide() { | 5567 | function hide() { |
5566 | - var $html = $('html, body'), | 5568 | + $html = $('html, body'); |
5569 | + | ||
5570 | + /*var $html = $('html, body'), | ||
5567 | scrollPosition = $html.data('scroll-position'); | 5571 | scrollPosition = $html.data('scroll-position'); |
5568 | 5572 | ||
5569 | // un-lock scroll position | 5573 | // un-lock scroll position |
5570 | $html.css('overflow', $html.data('previous-overflow')); | 5574 | $html.css('overflow', $html.data('previous-overflow')); |
5571 | $html.css('height', 'auto'); | 5575 | $html.css('height', 'auto'); |
5572 | - window.scrollTo(scrollPosition[0], scrollPosition[1]); | 5576 | + window.scrollTo(scrollPosition[0], scrollPosition[1]);*/ |
5573 | $('.chose-panel').hide(); | 5577 | $('.chose-panel').hide(); |
5574 | } | 5578 | } |
5575 | 5579 |
@@ -112,7 +112,9 @@ function disableNumEdit() { | @@ -112,7 +112,9 @@ function disableNumEdit() { | ||
112 | 112 | ||
113 | 113 | ||
114 | function show(html, cb) { | 114 | function show(html, cb) { |
115 | - var scrollPosition = [ | 115 | + var $html = $('html, body'); |
116 | + | ||
117 | + /*var scrollPosition = [ | ||
116 | document.documentElement.scrollLeft || document.body.scrollLeft, | 118 | document.documentElement.scrollLeft || document.body.scrollLeft, |
117 | document.documentElement.scrollTop || document.body.scrollTop | 119 | document.documentElement.scrollTop || document.body.scrollTop |
118 | ], | 120 | ], |
@@ -122,7 +124,7 @@ function show(html, cb) { | @@ -122,7 +124,7 @@ function show(html, cb) { | ||
122 | $html.data('previous-overflow', $html.css('overflow')); | 124 | $html.data('previous-overflow', $html.css('overflow')); |
123 | $html.css('overflow', 'hidden'); | 125 | $html.css('overflow', 'hidden'); |
124 | $html.css('height', '100%'); | 126 | $html.css('height', '100%'); |
125 | - window.scrollTo(scrollPosition[0], scrollPosition[1]); | 127 | + window.scrollTo(scrollPosition[0], scrollPosition[1]);*/ |
126 | 128 | ||
127 | if (html) { | 129 | if (html) { |
128 | $chosePanel.html(html); | 130 | $chosePanel.html(html); |
@@ -138,13 +140,15 @@ function show(html, cb) { | @@ -138,13 +140,15 @@ function show(html, cb) { | ||
138 | 140 | ||
139 | //隐藏当前Panel | 141 | //隐藏当前Panel |
140 | function hide() { | 142 | function hide() { |
141 | - var $html = $('html, body'), | 143 | + $html = $('html, body'); |
144 | + | ||
145 | + /*var $html = $('html, body'), | ||
142 | scrollPosition = $html.data('scroll-position'); | 146 | scrollPosition = $html.data('scroll-position'); |
143 | 147 | ||
144 | // un-lock scroll position | 148 | // un-lock scroll position |
145 | $html.css('overflow', $html.data('previous-overflow')); | 149 | $html.css('overflow', $html.data('previous-overflow')); |
146 | $html.css('height', 'auto'); | 150 | $html.css('height', 'auto'); |
147 | - window.scrollTo(scrollPosition[0], scrollPosition[1]); | 151 | + window.scrollTo(scrollPosition[0], scrollPosition[1]);*/ |
148 | $('.chose-panel').hide(); | 152 | $('.chose-panel').hide(); |
149 | } | 153 | } |
150 | 154 |
-
Please register or login to post a comment