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

Support triggering tooltip callback using customizable delay. #1251

Closed
wants to merge 2 commits into from
Closed

Support triggering tooltip callback using customizable delay. #1251

wants to merge 2 commits into from

Conversation

amejia1
Copy link
Contributor

@amejia1 amejia1 commented Jan 26, 2018

This will support an option for defining the delay to trigger the tooltip callback, or a delay less than or equal to 0 which means the tooltip callback will be triggered immediately. I also verified that not defining the new tooltipDelay option will set it to the original default delay.

The below shows what I need this for.
atom-xterm-no-tooltip-delay

@amejia1
Copy link
Contributor Author

amejia1 commented Feb 1, 2018

@Tyriar Following up on the discussion at #1243 , I tried your suggestion just now. I'm afraid I can't use the main click handler on right click for Atom. The main click handler is never triggered on right click.

@mofux Yes, and that is why I need this change. I have the "Open Link" and "Copy Link Address" menu items appear only on link hover by adding/removing a class in the terminal container div. I'm using tooltipCallback and leaveCallback for this but I need the tooltipCallback to be triggered immediately upon hovering over a link.

@Tyriar
Copy link
Member

Tyriar commented Feb 1, 2018

I actually just put out a PR that will enable the support of modifiers and I think you can leverage this to achieve your goal as the new willLinkActivate fires on mousedown, not click #1264. Please try it out and let me know how it goes.

Also looking into the future, there will likely be a big refactor to the link matcher API once custom parsers are supported #583, before we make it stable.

@amejia1
Copy link
Contributor Author

amejia1 commented Feb 1, 2018

I need something that fires on hover, not mouse down.

@Tyriar
Copy link
Member

Tyriar commented Feb 1, 2018

@amejia1 my thinking is that the mousedown would be hit before the contextmenu is, are you sure it doesn't?

@amejia1
Copy link
Contributor Author

amejia1 commented Feb 2, 2018

@Tyriar I was concerned that the context menu would appear first before this callback is called on Linux (where the contextmenu appears on mousedown instead of mouseup), but that is not the case. PR #1264 will work for me.

@amejia1 amejia1 closed this Feb 2, 2018
@Tyriar
Copy link
Member

Tyriar commented Feb 2, 2018

Great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants