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

do not use standart button title attribute (to avoid standart browser tooltips) #8

Closed
grigorijski opened this issue Jan 4, 2017 · 1 comment

Comments

@grigorijski
Copy link

grigorijski commented Jan 4, 2017

I propose to use custom attribute to display menu item title. If using standart "title" attribute tooltip is shown in addition to menu item (with same text) if I stay on item for a while

Proposed changes :

Library

220c220
<       var itemStr = '<button id="' + item.id + '" data-title="' + item.title + '" class="' + classStr + '"';
---
>       var itemStr = '<button id="' + item.id + '" title="' + item.title + '" class="' + classStr + '"';

CSS:

42,43c42,43
< .cy-context-menus-cxt-menuitem[data-title]:before {
<     content:attr(data-title);
---
> .cy-context-menus-cxt-menuitem[title]:before {
>     content:attr(title);
46c46
< .cy-context-menus-cxt-menuitem:not([data-title]):before {
---
> .cy-context-menus-cxt-menuitem:not([title]):before {

metincansiper added a commit that referenced this issue May 28, 2017
By suggestion of @grigorijski at #8
@metincansiper
Copy link
Collaborator

@grigorijski thanks for your suggestion I considered it. I renamed "title" option as "content" and added a "tooltipText" option which determines the tooltip text for a menu item. If you do not set this option for a menu item then that menu item will not have a tooltip. After making these changes I published v3.0.0. You can see the discussion at #2. I am closing the issue if you need you can re-open.

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

No branches or pull requests

2 participants