Skip to content
This repository was archived by the owner on Aug 14, 2021. It is now read-only.

menu item title dash "-" is not showing, but showing as seperator #136

Closed
ndvbd opened this issue Mar 5, 2019 · 5 comments
Closed

menu item title dash "-" is not showing, but showing as seperator #136

ndvbd opened this issue Mar 5, 2019 · 5 comments

Comments

@ndvbd
Copy link

ndvbd commented Mar 5, 2019

I'm trying to set a title simply to one dash.
Instead of showing the dash, it shows a seperator.

How do I show an html of dash only?

@ndvbd
Copy link
Author

ndvbd commented Mar 5, 2019

Here I see mention to _isDivider( item ) that you can override to disable this strange dash-to-divider conversion. But how do I pass it via jquery-ui-contextmenu?

@mar10
Copy link
Owner

mar10 commented Mar 6, 2019

I don‘t have a simple answer , but may be you can pass — or something similar instead of a hyphen

@mar10 mar10 closed this as completed Mar 6, 2019
@ndvbd
Copy link
Author

ndvbd commented Mar 9, 2019

Hi @mar10, I really need to be able to pass hyphen and other kind of strings. Can you kindly see if there's a solution for that, because I still want to use jquery-ui-contextmenu.

mar10 added a commit that referenced this issue Mar 10, 2019
Only four hyphens will be recognized as separator.
Update #136
@mar10
Copy link
Owner

mar10 commented Mar 10, 2019

Here is an example how you may solve it:

  1. patch the library, for example to only recognize four hyphens as separator
  2. globally override the jQuery UI Menu _isDivider callback

I am not currently planning a new release though.

@ndvbd
Copy link
Author

ndvbd commented Mar 14, 2019

Is there a way to to specify that a menu item should be a separator/divider without changing the titles to hyphens? i.e. by specifying some other attribute of the menu item? If that is possible, then we can remove this hyphens-to-divider scheme altogether....

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

No branches or pull requests

2 participants