Showing
1 changed file
with
8 additions
and
4 deletions
@@ -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