Commit d88009f 1 parent d8628ea commit d88009f Copy full SHA for d88009f
File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,8 @@ export default class Position {
182
182
const { right, bottom } = this . _getViewportOffset ( pinElement , align ) ;
183
183
firstPositionResult = {
184
184
left : right < 0 ? left + right : left ,
185
- top : bottom < 0 ? top + bottom : top ,
185
+ top,
186
+ // top: bottom < 0 ? top + bottom : top,
186
187
} ;
187
188
} else {
188
189
firstPositionResult = { left, top } ;
Original file line number Diff line number Diff line change @@ -361,7 +361,8 @@ describe('Overlay', () => {
361
361
362
362
simulateEvent . simulate ( btn , 'click' ) ;
363
363
assert ( document . body . style . overflowY === 'hidden' ) ;
364
- assert ( document . body . style . paddingRight === `${ scrollbarWidth } px` ) ;
364
+ // paddingRight 有没有值取决于当前浏览器环境是否有滚动条(mac可以设置默认有,或默认没有)
365
+ // assert(document.body.style.paddingRight === `${scrollbarWidth}px`);
365
366
366
367
simulateEvent . simulate ( btn , 'click' ) ;
367
368
yield delay ( 500 ) ;
@@ -585,7 +586,7 @@ describe('Overlay', () => {
585
586
container . remove ( ) ;
586
587
} ) ;
587
588
588
- it ( 'fix bottom & left overflow' , ( ) => {
589
+ it ( 'fix left overflow' , ( ) => {
589
590
const container = document . createElement ( 'div' ) ;
590
591
591
592
function Demo ( props ) {
@@ -616,7 +617,7 @@ describe('Overlay', () => {
616
617
document . querySelector ( '.next-overlay-inner' ) . style . left ===
617
618
`${ parseFloat ( window . getComputedStyle ( document . body ) . width ) - 200 - 1 } px` // Reason to subtract 1, see: Overly._isInViewport
618
619
) ;
619
- assert ( document . querySelector ( '.next-overlay-inner' ) . style . top === '0px' ) ;
620
+ // assert(document.querySelector('.next-overlay-inner').style.top === '0px');
620
621
container . remove ( ) ;
621
622
document . querySelector ( '.next-overlay-wrapper' ) . remove ( ) ;
622
623
} ) ;
You can’t perform that action at this time.
0 commit comments