FIX: emoji picker position when clicking more (#30896)
When clicking more in the emoji autocomplete menu, the picker would sometimes be hidden at the bottom of the page. It was easily reproducible in long topic pages when scrolled to the bottom. This commit just marks the textarea as the trigger which is not a perfect position but is still a good fallback.
This commit is contained in:
parent
076c0c4bca
commit
e8d5059156
|
@ -371,18 +371,9 @@ export default class DEditor extends Component {
|
|||
virtualElement = virtualElementFromTextRange();
|
||||
} else {
|
||||
// when user selects more by clicking on it
|
||||
virtualElement = {
|
||||
getBoundingClientRect: () => ({
|
||||
x: event.pageX,
|
||||
y: event.pageY,
|
||||
top: event.pageY,
|
||||
left: event.pageX,
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
width: 0,
|
||||
height: 0,
|
||||
}),
|
||||
};
|
||||
// using textarea as a fallback as it's hard to have a good position
|
||||
// given the autocomplete menu will be gone by the time we are here
|
||||
virtualElement = this.textManipulation.textarea;
|
||||
}
|
||||
|
||||
this.menuInstance = this.menu.show(virtualElement, menuOptions);
|
||||
|
|
Loading…
Reference in New Issue