-
Notifications
You must be signed in to change notification settings - Fork 736
Bugfix: fixed positioning context menu when used with d3 tree #354
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
Conversation
|
It is positioned wrong, in pages without D3 also. In Chrome, I right clicked "TRIGGER" and I didn't move mouse:
It seems Chrome gets those of inline-element by As @mehranshakeri said, I also think that |
|
This issue occurs in IE also. |
|
Thanks for the contribution. I'll have a look at it soon. I'll try and find out why there is a offsetX used so we might be able to remove it. The pageX fallback when there is no offsetX has been added only this januari, so i'll dig around and see if i can see a valid reason to keep it. |
|
Howdy. I seem to be running into the same issue in a project. As a workaround, I have reverted to version 2.0.1 for the time being. |
|
Same thing! I have reverted to 2.0.1 as @AllBogs did, and it works correct. |
|
Hi guys, I was looking into this and my conclusion is the earlier "fix" that added offsetX should be reverted sadly. I'll try and accept these changes this week and release a new version so you update again. Thanks all for the input. |
|
At least, @mehranshakeri's patch seems to working fine. |
|
Yeah his patch is basically remove the offsetX/Y from the code again :) |
|
Note to self; original PR #354 |
- implemented AWS S3 plugin - extended list of previewed file types via ViewerJS; @see config["pdfs"]["pdfsExt"] - added preview of MS Office file types via Google Docs Viewer; @see config["docs"]["showGoogleViewer"] - Dropzone file uploader replaced with Blueimp's jQuery-File-Upload, which provides out of the box following features: - chunked upload; @see config["upload"]["chunkSize"] - image resizing; Wideimage lib was removed, - image orientation (orientation), etc. - "upload" section in config file was - added new "Type" column in list view; - new "downloadItem" method, to handle download errors correctly; - better error handling for client-size and in PHP connector; - jQuery-ContextMenu plugin reverted to v.2.0.1 until the bug with positioning is fixed; @see swisnl/jQuery-contextMenu#354 - IMPORTANT: PHP is the only actual connector; compatibility with others connectors was completely broken, refactoring required
|
I merged this to fix the issue for the people having it. #341 needs to be revisited. |



Using jQuery contextMenu with d3 tree (http://bl.ocks.org/mbostock/4339083) object creates a problem with positioning the menu in wrong place.
ContextMenu in opening time checks "offsetX" attribute of event and in case if exists, it does some calculation to position the menu. But in combination with d3 tree, this value will be calculated wrong and menu will be positioned in far right side of page. I have seen in absence of "offsetX" attribute, "pageX" is used. I could fix this issue with replacing the whole condition block with just else part.
Is there any reason for using offsetX when pageX exists all the time?