Bug 1894935 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

### Description

When the panel is opened such that the target screen location is near to the bottom edge of the screen, and the panel would not have enough room to fully open in the visible view at that location, the panel's location is flipped vertically over the horizontal axis of the target point, allowing it to have enough room to fully open. 

When this happens, dragging the textarea resizer downward causes the panel both to glitch as well as grow from the top instead of the bottom.

We should just disable resizing if the panel was opened with vertical flip mode. 

---

### Steps to implement

* Fixing this will require propagating the [mVFlip](https://searchfox.org/mozilla-central/rev/386c7f17b2421374930a447c9f424910551b659d/layout/xul/nsMenuPopupFrame.h#362-363) and [mHFlip](https://searchfox.org/mozilla-central/rev/386c7f17b2421374930a447c9f424910551b659d/layout/xul/nsMenuPopupFrame.h#362-363) boolean values up through the [popuppositioned](https://searchfox.org/mozilla-central/source/dom/chrome-webidl/PopupPositionedEvent.webidl) event, so that we can tell if the arrow panel was opened with the vertical flip mode.
* Following that, we need to add a listener for the `popuppositioned` event on the SelectTranslationsPanel and disable the resizer if vertical flip mode was used. 

---

### Tests to implement

* This is very hard to test in automation, as it involves clicking and dragging with the mouse.
### Description

When the panel is opened such that the target screen location is near to the bottom edge of the screen, and the panel would not have enough room to fully open in the visible view at that location, the panel's location is flipped vertically over the horizontal axis of the target point, allowing it to have enough room to fully open. 

When this happens, dragging the textarea resizer downward causes the panel both to glitch as well as grow from the top instead of the bottom.

We should just disable resizing if the panel was opened with vertical flip mode. 

---

### Steps to Reproduce

* Open a page and highlight some text.
* Open the SelectTranslationsPanel via the right-click context menu very close to the bottom edge of the screen.

**Expected Behavior**
When the panel opens and translates, the textarea resizer is not available.

**Actual behavior**
When the panel opens and translates, the textarea resizer is available and causes glitchy behavior when used that varies slightly for each operating system.


---

### Steps to implement

* Fixing this will require propagating the [mVFlip](https://searchfox.org/mozilla-central/rev/386c7f17b2421374930a447c9f424910551b659d/layout/xul/nsMenuPopupFrame.h#362-363) and [mHFlip](https://searchfox.org/mozilla-central/rev/386c7f17b2421374930a447c9f424910551b659d/layout/xul/nsMenuPopupFrame.h#362-363) boolean values up through the [popuppositioned](https://searchfox.org/mozilla-central/source/dom/chrome-webidl/PopupPositionedEvent.webidl) event, so that we can tell if the arrow panel was opened with the vertical flip mode.
* Following that, we need to add a listener for the `popuppositioned` event on the SelectTranslationsPanel and disable the resizer if vertical flip mode was used. 

---

### Tests to implement

* This is very hard to test in automation, as it involves clicking and dragging with the mouse.

Back to Bug 1894935 Comment 0