Context Menu Opera Browser

9 posts, 0 answers
  1. Meik Napierski
    Meik Napierski avatar
    28 posts
    Member since:
    Sep 2009

    Posted 29 Apr 2010 Link to this post

    Hello,
    i have problems with the context menu and the Opera Browser. In all other Browser IE or FireFox the context menu will be shown correctly only in Opera ( I testes 9.63 and 10.x) the standard Opera context menu will be shown and not the rad context menu.

    greetings
    Meik Napierski
  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 29 Apr 2010 Link to this post

    In order to allow the Context Menus of the RadControls to display you will need to disable the Opera context menu. You can do this by following this path:

    Tools -> Preferences -> Advanced -> JavaScript options -> Allow script to receive right clicks


    Once you have done this you should be able to have the Context Menu display :)


  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Martin Roussel
    Martin Roussel avatar
    246 posts
    Member since:
    Jan 2010

    Posted 31 Oct 2012 Link to this post

    Hi, I noticed today a similar problem with Q2 2012 and Opera Version 12.02 Build 1578. I have a RadContextMenu on a RadGrid (appearing on grid row right-click). Both the Opera context menu and mine are appearing at same time (but mouse hover coloring in my menu is not working). Seems like the opera one has the 'focus' since hovering coloring works on it. If I go out of Opera and come back to it, only my context menu remains visible (and now hovering works good).

    Weird thing is Context Menu demos on your site seem to be working fine in my Opera browser.

    Any idea?
  5. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 01 Nov 2012 Link to this post

    Hello Martin,

    Please find an additional information about some RadContextMenu browser limitations including Opera - here in Description section marked as "Note:".

    Please try the following approach for Opera(Version 12.02 Build 1578) - see the attached image:

    Settings -> Preferences -> Advanced -> Content -> Enable JavaScript -> JavaScript Options -> Allow scripts to detect context menus.

    Hope that this will lead you into right direction.

    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Martin Roussel
    Martin Roussel avatar
    246 posts
    Member since:
    Jan 2010

    Posted 01 Nov 2012 Link to this post

    Boyan,

    Im already aware of that setting and my opera already has that option checked. In fact, my context menu works in Opera. What I can't explain (and it has to be the code IMO) is your context menu demo (DEMO) is not showing the browser context menu in the same version of Opera.

    Can you please try it and let know if you see it in yours?
  7. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 06 Nov 2012 Link to this post

    Hello Martin,

    I have recorded a video that demonstrates RadContentextMenu behavior in Opera browser with the provided online-demo. As shown on the video clip the default browser context menu is showing as long as I click outside the zones where our RadContextMenu is suppose to show. Please watch the sample video clip here.

    Providing a sample project that reproduce this issue or a video clip that shows this unusual behavior would be very helpful.

    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. Martin Roussel
    Martin Roussel avatar
    246 posts
    Member since:
    Jan 2010

    Posted 06 Nov 2012 Link to this post

    Boyan, let me try to be more clear. Sorry if im not.

    You are experiencing the same behavior than me for the mentioned telerik demo page (see "screen2.jpg" ive attached). When right-clicking the TV, only your custom context menu appears, which is good. Everything is good for everybody so far.

    However, in my app, I use a RadGrid where both the standard AND my context menus are appearing at the same time when im right-clicking on one of the RadGrid row (to make my context menu appear). Ive attached "screen1.jpg" that shows it.

    Here some code in case it could help:

    RadContextMenu markup:
    <telerik:RadContextMenu ID="RadGrid5_Menu" Skin="WebBlue" runat="server" OnClientItemClicked="RadGrid5_Menu_OnClientItemClicked" EnableRoundedCorners="true" EnableShadows="true">
                                    <Items>
                                        <telerik:RadMenuItem Text="Reply" meta:resourcekey="labReply" Value="1" ImageUrl="~/Images/Icons/Comment.png"/>
                                        <telerik:RadMenuItem Text="Mark as 'Needing Attention'" meta:resourcekey="labMarkNeedingAttention" Value="2" ImageUrl="~/Images/Icons/warning16x16.png" />
                                        <telerik:RadMenuItem Text="Mark as 'Treated'" meta:resourcekey="labMarkTreated" Value="3" ImageUrl="~/Images/Icons/check16x16.png" />
                                    </Items>
                                </telerik:RadContextMenu>


    RadGrid Markup ClientSettings (RowContextMenu function is called on row right-click)
    <ClientSettings EnablePostBackOnRowClick="false" AllowRowsDragDrop="false" AllowDragToGroup="false" AllowColumnsReorder="false" ReorderColumnsOnClient="false" ColumnsReorderMethod="Reorder">
                                                <Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="false" AllowColumnResize="true" AllowResizeToFit="true"/>
                                                <Animation AllowColumnReorderAnimation="false" AllowColumnRevertAnimation="true" />
                                                <Selecting AllowRowSelect="true"/>
                                                <ClientEvents OnRowClick="OnRowClick" OnRowContextMenu="RowContextMenu"></ClientEvents>
    </ClientSettings>

    JS:
    var gblID = 0;
     
    function RowContextMenu(sender, eventArgs) {
     
                var menu = $find("<%=RadGrid5_Menu.ClientID %>");
                var evt = eventArgs.get_domEvent();
     
                if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
                    return;
                }
     
                var index = eventArgs.get_itemIndexHierarchical();
                var ID;
     
                //select row
                if (eventArgs.get_tableView().get_name() == "Detail") {
     
                    index = index.substring(index.indexOf("_") + 1, index.length);
     
                    sender.get_masterTableView().selectItem(eventArgs.get_tableView().get_dataItems()[index].get_element(), true);
     
                    ID = eventArgs.get_tableView().get_dataItems()[index].getDataKeyValue("intID");
     
                }
                else {
     
                    sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
     
                    ID = sender.get_masterTableView().get_dataItems()[index].getDataKeyValue("intID");
     
                }
     
     
                gblID = ID.toString();
     
                var itemAttention;
                var itemTreated;
                itemAttention = menu.findItemByValue(2);
                itemAttention.disable();
                itemTreated = menu.findItemByValue(3);
                itemTreated.disable();
     
                if (eventArgs.get_tableView().get_name() != "Detail") {
     
                        itemAttention.enable();
                     
                }
               
     
                menu.show(evt);
     
                evt.cancelBubble = true;
                evt.returnValue = false;
     
                if (evt.stopPropagation) {
                    evt.stopPropagation();
                    evt.preventDefault();
                }
     
     
            }

    UPDATE: I also tested your context menu demo containing a RadGrid (DEMO) and I dont have the issue at all in my Opera, as illustrated in "screen3.jpg".
  9. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 09 Nov 2012 Link to this post

    Hello Martin,

    I inspected the described issue and it seems to be a misbehavior. I already logged in our internal system so we can conduct further research and we fix it in case this is a bug of the menu control. Meanwhile you could use the following workaround:

    $telerik.$('#element').mousedown(function (event) {
                var number = event.which.toString();
                if (number == "3") {
                   // if this value is 3, so right mouse button is clicked
                   // here goes your logic to hide RadMenu from page.
                }
                  
            });

    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  10. Martin Roussel
    Martin Roussel avatar
    246 posts
    Member since:
    Jan 2010

    Posted 09 Nov 2012 Link to this post

    Thanks alot Boyan,

    UPDATE! I tried to backing up my problematic grid code (markup+code-behind) and replacing it by the one from the grid context menu demo (DEMO) and no problem with the "new" grid in Opera. I then tried to modify the code chunk by chunk to match my original grid (and likely spot the issue) and never had the issue! THE WORSE: I replaced back the code with the original backed-up code (problematic grid) and no issue neither! Maybe all the cache resets I did on the browser shook it up or something, but looks like I cant replicate the problem anymore. Now, that is weird.

    Let's consider this resolved for now.

    Thanks again
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017