Closed Bug 1894935 Opened 7 months ago Closed 7 months ago

SelectTranslationsPanel glitches when resized after opening with vertical flip mode

Categories

(Firefox :: Translations, defect, P3)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox125 --- unaffected
firefox126 --- unaffected
firefox127 --- disabled
firefox128 --- verified

People

(Reporter: nordzilla, Assigned: nordzilla)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

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 and mHFlip boolean values up through the popuppositioned 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.
Assignee: nobody → enordin

Set release status flags based on info from the regressing bug 1890490

Adds attributes to the popuppositioned event that report
whether vertical flip and/or horizontal flip modes were
used in the positioning of the popup.

Determines if the SelectTranslationsPanel was opened
with the vertical flip mode, and, if so, disables the
textarea resizer because it causes the panel to grow
from the top instead of the bottom, even though the
user is dragging the resizer downward.

Depends on D209395

Attachment #9400025 - Attachment description: WIP: Bug 1894935 - Propagate flip modes through popuppositioned r=emilio → WIP: Bug 1894935 - Propagate flip modes through popuppositioned r=emilio!
Attachment #9400025 - Attachment description: WIP: Bug 1894935 - Propagate flip modes through popuppositioned r=emilio! → Bug 1894935 - Propagate flip modes through popuppositioned r=emilio!
Attachment #9400026 - Attachment description: WIP: Bug 1894935 - Disable textarea resize on vertical flip r=#translations-reviewers! → Bug 1894935 - Disable textarea resize on vertical flip r=#translations-reviewers!
Attachment #9400025 - Attachment is obsolete: true
Attachment #9400026 - Attachment description: Bug 1894935 - Disable textarea resize on vertical flip r=#translations-reviewers! → Bug 1894935 - Disable textarea resize based on popuppositioned r=#translations-reviewers!

Set release status flags based on info from the regressing bug 1890490

Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aa76a8a2f193 Disable textarea resize based on popuppositioned r=translations-reviewers,desktop-theme-reviewers,gregtatum,emilio
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

The patch landed in nightly and beta is affected.
:nordzilla, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox127 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(enordin)

This does not need to be uplifted. The target release is now 128, and the panel is preffed off by default in 127 release build.

Flags: needinfo?(enordin)
Regressions: 1898491

I can confirm the intended fix in Nightly v128.0a1 on Windows10, MacOS11 and Ubuntu22 (both wayland and x11 Windows Protocols).

The resizer is no longer displayed when the user triggers a "flip-mode" dialog (he selects a longer bit of text, right-clicks on the bottom half or closer to the bottom of the screen, and chooses the Translate option from the context menu).
This behavior is different in Ubuntu 22 + Wayland, meaning that the resizer is still displayed when the Translate dialog is opened in the "flip-mode" described above, but when used, the resizer does not show any glitchy behavior.

The downside to this fix is that, in some situations, when the dialog is opened in "flip-mode" it has enough space to resize, but the resizer is disabled, leaving the users confused as to why they can't resize some of them. I have logged an enhancement for this issue: bug 1898491.

Status: RESOLVED → VERIFIED
OS: Unspecified → All
Hardware: Unspecified → Desktop
No longer regressions: 1898491
See Also: → 1902254
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: