Commit 511a3769 authored by hbcui1984's avatar hbcui1984

fixed:页面内容滚动后,H5模式的actionsheet位置不正确的bug

parent 8b44a586
...@@ -3388,6 +3388,10 @@ select:focus ...@@ -3388,6 +3388,10 @@ select:focus
{ {
display: none; display: none;
} }
.mui-popover.mui-popover-action.mui-popover-bottom
{
position: fixed;
}
.mui-popover.mui-popover-action.mui-active .mui-popover.mui-popover-action.mui-active
{ {
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5158,15 +5158,18 @@ var mui = (function(document, undefined) { ...@@ -5158,15 +5158,18 @@ var mui = (function(document, undefined) {
if (!popover || !anchor) { if (!popover || !anchor) {
return; return;
} }
if (isActionSheet) { //actionsheet
setStyle(popover, 'block')
return;
}
var wWidth = window.innerWidth; var wWidth = window.innerWidth;
var wHeight = window.innerHeight; var wHeight = window.innerHeight;
var pWidth = popover.offsetWidth; var pWidth = popover.offsetWidth;
var pHeight = popover.offsetHeight; var pHeight = popover.offsetHeight;
if (isActionSheet) { //actionsheet
setStyle(popover, 'block', (wHeight - pHeight + window.pageYOffset), (wWidth - pWidth) / 2)
return;
}
var aWidth = anchor.offsetWidth; var aWidth = anchor.offsetWidth;
var aHeight = anchor.offsetHeight; var aHeight = anchor.offsetHeight;
var offset = $.offset(anchor); var offset = $.offset(anchor);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3388,6 +3388,10 @@ select:focus ...@@ -3388,6 +3388,10 @@ select:focus
{ {
display: none; display: none;
} }
.mui-popover.mui-popover-action.mui-popover-bottom
{
position: fixed;
}
.mui-popover.mui-popover-action.mui-active .mui-popover.mui-popover-action.mui-active
{ {
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5158,15 +5158,18 @@ var mui = (function(document, undefined) { ...@@ -5158,15 +5158,18 @@ var mui = (function(document, undefined) {
if (!popover || !anchor) { if (!popover || !anchor) {
return; return;
} }
if (isActionSheet) { //actionsheet
setStyle(popover, 'block')
return;
}
var wWidth = window.innerWidth; var wWidth = window.innerWidth;
var wHeight = window.innerHeight; var wHeight = window.innerHeight;
var pWidth = popover.offsetWidth; var pWidth = popover.offsetWidth;
var pHeight = popover.offsetHeight; var pHeight = popover.offsetHeight;
if (isActionSheet) { //actionsheet
setStyle(popover, 'block', (wHeight - pHeight + window.pageYOffset), (wWidth - pWidth) / 2)
return;
}
var aWidth = anchor.offsetWidth; var aWidth = anchor.offsetWidth;
var aHeight = anchor.offsetHeight; var aHeight = anchor.offsetHeight;
var offset = $.offset(anchor); var offset = $.offset(anchor);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -166,15 +166,18 @@ ...@@ -166,15 +166,18 @@
if (!popover || !anchor) { if (!popover || !anchor) {
return; return;
} }
if (isActionSheet) { //actionsheet
setStyle(popover, 'block')
return;
}
var wWidth = window.innerWidth; var wWidth = window.innerWidth;
var wHeight = window.innerHeight; var wHeight = window.innerHeight;
var pWidth = popover.offsetWidth; var pWidth = popover.offsetWidth;
var pHeight = popover.offsetHeight; var pHeight = popover.offsetHeight;
if (isActionSheet) { //actionsheet
setStyle(popover, 'block', (wHeight - pHeight + window.pageYOffset), (wWidth - pWidth) / 2)
return;
}
var aWidth = anchor.offsetWidth; var aWidth = anchor.offsetWidth;
var aHeight = anchor.offsetHeight; var aHeight = anchor.offsetHeight;
var offset = $.offset(anchor); var offset = $.offset(anchor);
......
...@@ -61,6 +61,11 @@ ...@@ -61,6 +61,11 @@
.#{$namespace}popover-arrow{ .#{$namespace}popover-arrow{
display: none; display: none;
} }
&.#{$namespace}popover-bottom{
position: fixed;
}
// Active modal // Active modal
&.#{$namespace}active { &.#{$namespace}active {
@include transform(translate3d(0, 0, 0)); @include transform(translate3d(0, 0, 0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment