Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-click context menu protrudes beyond edges of the Ketcher workspace #4069

Closed
Zhirnoff opened this issue Feb 9, 2024 · 4 comments · Fixed by #5182
Closed

Right-click context menu protrudes beyond edges of the Ketcher workspace #4069

Zhirnoff opened this issue Feb 9, 2024 · 4 comments · Fixed by #5182

Comments

@Zhirnoff
Copy link
Collaborator

Zhirnoff commented Feb 9, 2024

Steps to Reproduce

  1. Open Ketcher (iFrame)
  2. Add style <div style="width: 800px; height: 500px; left: 300px; top: 200px; position: absolute;"
  3. Add some structures at the edges of canvas
    Case1
    Point at atom or bond near structure located at edge and right-click and then, without removing the menu, right-click again on the structure located at edge (select closest atom or bond to the edge of canvas)
    Case2
    Open developer console and move it closer to boundaries of the Ketcher. Call right-click menu on structure closest to edge (look attached video)

Actual behavior
Right-click context menu protrudes beyond edges of the Ketcher workspace.
Alignment of letters and numbers in pop-up windows is also broken
Note: This problem appears only in the built-in Ketcher(iFrame). On test benches, the algorithm takes into account the distance to the edge of canvas and draws a third menu depending on distance to edge of canvas.
2024-06-27_16h55_53

Expected behavior
The right-click context menu does not protrude beyond the edges of Ketcher workspace.
Also, after discussion with @vanoprenko @AlexeyGirin @Andrey-Antonov , we came to the conclusion that the third menu requires a redesign. The design will be developed by @Andrey-Antonov (TBD) and provided here.

Screenshots

2024-06-27_16h56_15

2024-02-09_19h16_51

2024-02-09_19h19_48.mp4

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Version 112.0.5615.138 (Official Build) (64-bit)

Ketcher version
[Version 2.18.0-rc.5]

#187864465

Updated visuals:
image

@AlexeyGirin
Copy link
Collaborator

@Andrey-Antonov to propose the solution

NataliaLoginova pushed a commit that referenced this issue Jul 31, 2024
… workspace (#5182)

* feat: add new logic for modal windows

* feat:changed some of the functional logic

* feat: change style in toggleButtonGroup

* feat: add styles and logic for context menu

* feat: update test

* - fixed context menu position calculation from ketcher window instead of document

* - removed timeout

* - updated screenshots

---------

Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
@rrodionov91 rrodionov91 reopened this Jul 31, 2024
@rrodionov91
Copy link
Collaborator

Still need to correct the design

@KristinaKasyanovskaya
Copy link
Collaborator

Still need to correct the design

Created a new bug for сorrect the design => #5202

@Zhirnoff
Copy link
Collaborator Author

Zhirnoff commented Aug 7, 2024

Tested. Bug fixed. But design will be implemented in scope of issue #5202

2024-08-07_17h12_33.mp4

Desktop:

  • OS: Windows 11
  • Browser Chrome
  • Version 124.0.6367.79 (Official Build) (64-bit)

Ketcher version
[Version 2.24.0-rc.1]
Indigo version
[Version 1.23.0-rc.1]

Guch1g0v pushed a commit that referenced this issue Oct 17, 2024
… workspace (#5182)

* feat: add new logic for modal windows

* feat:changed some of the functional logic

* feat: change style in toggleButtonGroup

* feat: add styles and logic for context menu

* feat: update test

* - fixed context menu position calculation from ketcher window instead of document

* - removed timeout

* - updated screenshots

---------

Co-authored-by: Roman Rodionov <roman_rodionov@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment