parent
93cb26e879
commit
9d7352a9e4
@ -10,6 +10,14 @@
|
|||||||
You should also include the user name that made the change.
|
You should also include the user name that made the change.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## 12.x.x (unreleased)
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
-
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
- Client: リアクションピッカーの高さが低くなったまま戻らないことがあるのを修正 @syuilo
|
||||||
|
|
||||||
## 12.107.0 (2022/02/12)
|
## 12.107.0 (2022/02/12)
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
@ -102,7 +102,6 @@ const align = () => {
|
|||||||
if (type.value === 'drawer') return;
|
if (type.value === 'drawer') return;
|
||||||
|
|
||||||
const popover = content.value!;
|
const popover = content.value!;
|
||||||
|
|
||||||
if (popover == null) return;
|
if (popover == null) return;
|
||||||
|
|
||||||
const rect = props.src.getBoundingClientRect();
|
const rect = props.src.getBoundingClientRect();
|
||||||
@ -131,20 +130,23 @@ const align = () => {
|
|||||||
left = window.innerWidth - width;
|
left = window.innerWidth - width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const underSpace = (window.innerHeight - MARGIN) - top;
|
||||||
|
const upperSpace = (rect.top - MARGIN);
|
||||||
|
|
||||||
// 画面から縦にはみ出る場合
|
// 画面から縦にはみ出る場合
|
||||||
if (top + height > (window.innerHeight - MARGIN)) {
|
if (top + height > (window.innerHeight - MARGIN)) {
|
||||||
if (props.noOverlap) {
|
if (props.noOverlap) {
|
||||||
const underSpace = (window.innerHeight - MARGIN) - top;
|
|
||||||
const upperSpace = (rect.top - MARGIN);
|
|
||||||
if (underSpace >= (upperSpace / 3)) {
|
if (underSpace >= (upperSpace / 3)) {
|
||||||
maxHeight.value = underSpace;
|
maxHeight.value = underSpace;
|
||||||
} else {
|
} else {
|
||||||
maxHeight.value = upperSpace;
|
maxHeight.value = upperSpace;
|
||||||
top = (upperSpace + MARGIN) - height;
|
top = (upperSpace + MARGIN) - height;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
top = (window.innerHeight - MARGIN) - height;
|
top = (window.innerHeight - MARGIN) - height;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
maxHeight.value = underSpace;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 画面から横にはみ出る場合
|
// 画面から横にはみ出る場合
|
||||||
@ -152,20 +154,23 @@ const align = () => {
|
|||||||
left = window.innerWidth - width + window.pageXOffset - 1;
|
left = window.innerWidth - width + window.pageXOffset - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const underSpace = (window.innerHeight - MARGIN) - (top - window.pageYOffset);
|
||||||
|
const upperSpace = (rect.top - MARGIN);
|
||||||
|
|
||||||
// 画面から縦にはみ出る場合
|
// 画面から縦にはみ出る場合
|
||||||
if (top + height - window.pageYOffset > (window.innerHeight - MARGIN)) {
|
if (top + height - window.pageYOffset > (window.innerHeight - MARGIN)) {
|
||||||
if (props.noOverlap) {
|
if (props.noOverlap) {
|
||||||
const underSpace = (window.innerHeight - MARGIN) - (top - window.pageYOffset);
|
|
||||||
const upperSpace = (rect.top - MARGIN);
|
|
||||||
if (underSpace >= (upperSpace / 3)) {
|
if (underSpace >= (upperSpace / 3)) {
|
||||||
maxHeight.value = underSpace;
|
maxHeight.value = underSpace;
|
||||||
} else {
|
} else {
|
||||||
maxHeight.value = upperSpace;
|
maxHeight.value = upperSpace;
|
||||||
top = window.pageYOffset + ((upperSpace + MARGIN) - height);
|
top = window.pageYOffset + ((upperSpace + MARGIN) - height);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
top = (window.innerHeight - MARGIN) - height + window.pageYOffset - 1;
|
top = (window.innerHeight - MARGIN) - height + window.pageYOffset - 1;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
maxHeight.value = underSpace;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user