-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Context Menu doesn't work when container has transform: translate #1911
Comments
Here are the lines that likely need to change to fix this: Lines 93 to 94 in c908da3
|
@Tyriar thanks for being so attentive to this, any initial thoughts on what's causing this? I don't know enough about CSS to usefully diagnose this, but if you give me some thoughts I can try to test some stuff out to help hone in on the root cause. |
@zxlin ev.clientX and ev.clientY are probably relative to the wrong element, that would need to be tweaked to work in both cases. |
Very strange, looks like a browser bug to me. My guess would be that the textarea does not yet have focus at the very moment the context menu is opened, but it only seems to happen if a Is there any specific reason you use translate? CSS transformations run on the GPU and don't force a relayout, which is why they are so fast to render, but it's usually a bad idea to use them for layouting. |
@mofux We have xterm inside a draggable container to allow the user to lay out their work space to their personal preference. That's simply the lib's way of implementing draggable. One thing of note here is that the |
Details
Steps to reproduce
Related: #1810
Example code snippet
Also here: https://codesandbox.io/s/o9xjjwo47y
The text was updated successfully, but these errors were encountered: