In the TL demo in the "Tables: Simple" view or in Prime, you can generate bookmark links to specific objects. An asterisk is displayed for this purpose. In Internet Explorer, you can click it normally to save the link as a favorite. In all other browsers, however, you must instead copy the link using the browser’s context menu. This no longer works, though, because the browser’s context menu is also replaced by the TL context menu in this location (e.g., due to the surrounding Edit component).
Therefore, a general solution must be implemented to mark a DOM element (e.g., via a CSS class) in such a way that the TL context menu is suppressed there, making the normal browser context menu available again. This capability must then be utilized when rendering the bookmark links (com.top_logic.layout.basic.BookmarkRenderer.writeBookmarkIcon(DisplayContext, TagWriter, LabelProvider, Object, BoundComponent)).
Improvement
When opening a context menu, the client-side script ` ajax-form.js > openContextMenu ` now checks whether the ` data-browser-menu` attribute is set or true. If so, the browser context menu is displayed instead of the TL context menu.
Usage
Elements that should also display the browser context menu in the future can be marked with the corresponding attribute `com.top_logic.mig.html.HTMLConstants.TL_BROWSER_MENU_ATTR `. An example of this is now implemented in `com.top_logic.layout.basic.BookmarkRenderer.writeBookmarkIcon(DisplayContext, TagWriter, LabelProvider, Object, BoundComponent) `:
{{{#!java out.writeAttribute(TL_BROWSER_MENU_ATTR, true); }}}
Test
Under Table > Try adding a bookmark by right-clicking. This should open the browser’s context menu.