This is a migrated thread and some comments may be shown as answers.

Asp.Net Ajax Context Menu doesn't remain open on FireFox 66.0.x, MacOS 10.14.x

7 Answers 20 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrei
Top achievements
Rank 2
Andrei asked on 11 Apr 2019, 04:00 PM

Hello guys,

 

We've faced an issue with context menu on several RAD controls when running on MacOS 10.14.x (Mojave) with FireFox 66.0.x (Quantum).

Using touchpad or mouse, when right clicking for context menu, it just flashed and doesn't stay open: it opens and then suddenly closes.

We are using Telerik Asp.Net Ajax version 2017.2.503.40 but it can be also replicated on your demo version:

https://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/context-menu/defaultcs.aspx

https://demos.telerik.com/aspnet-ajax/scheduler/examples/overview/defaultcs.aspx

 

Not sure if you can provide a fast workaround for this but I just wanted to let you know.

I've checked for some open cases before creating this thread and hope I didn't duplicate something. Please move/close it if necessary.

 

Regards,

Andrei V.

 

7 Answers, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 16 Apr 2019, 11:48 AM
Hello Andrei,

Thank you for reporting this issue to us. 

Indeed, there is a problem with the context menu event in the MacOS version of FireFox. The new update might change how the events are handled and the mouseup of the right click to act as a separate event, which causes the RadContextMenu to close.

We have logged it in our feedback portal where you can subscribe and follow for any progress. As soon as we find a feasible workaround, we will share it in the feedback portal item.

If you are manually showing the menu using the show() or showAt() method, a possible workaround would be calling the method in a 100ms timeout: 

<script>
    function f() {
        $telerik.$("#wrapper").click(function (ev) {
            var menu = $find("<%= RadContextMenu1.ClientID %>");
            menu.show(ev);
        });
        $telerik.$("#wrapper").on("contextmenu", function (ev) {
            var menu = $find("<%= RadContextMenu1.ClientID %>");
            setTimeout(function () {
                menu.show(ev);
            }, 100);
        });
        // Sys.Application.remove_load(f); 
    }
    Sys.Application.add_load(f);
</script>

As a token of gratitude for bringing this up to our attention, we have updated your Telerik points. 

Regards,
Peter Milchev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Andrei
Top achievements
Rank 2
answered on 01 Aug 2019, 08:37 AM

Hello Peter,

Thank you and sorry for my big delay. Your workaround did fix some of our problems but what about RadScheduler (time slot context menu and appointment context menu) because is these cases we don't show the context menu from javascript, it's handled by the framework, we just specify the context menu items.

<AppointmentContextMenus>
                            <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
                                <Items>
                                    <telerik:RadMenuItem Text="Edit" Value="Edit" PostBack="false" />
                                    <telerik:RadMenuItem Text="Complete" Value="Complete" PostBack="false" />
                                   </Items>
                            </telerik:RadSchedulerContextMenu>
</AppointmentContextMenus>

 

<TimeSlotContextMenus>
                            <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerTimeSlotContextMenu">
                                <Items>
                                    <telerik:RadMenuItem Text="Call" Value="C" PostBack="false" />
                                    <telerik:RadMenuItem Text="Event" Value="E" PostBack="false" />
                                </Items>
                            </telerik:RadSchedulerContextMenu>
</TimeSlotContextMenus>

 

 

In this case your proposal doesn't work, I suspect.

Thanks!

 

Andrei V.

0
Andrei
Top achievements
Rank 2
answered on 08 Aug 2019, 06:05 AM
Any update on this, please?
0
Peter Milchev
Telerik team
answered on 09 Aug 2019, 03:36 PM

Hello Andrei,

I am afraid that there is no update currently on this issue. 

I will raise the priority of this issue so that it is investigated sooner and a possible workaround that would cover all scenarios is researched.

Regards, Peter Milchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Andrei
Top achievements
Rank 2
answered on 12 Sep 2019, 07:54 AM

Hello guys,

 

Returning to this, do you have any update?

In addition to this, we have discovered other problems with context menu on MAC, but this time on Safari 12.1.2.

Right click opens the context menu and works good, but CTRL+Left CLICK (which should also be Right Click) opens the context menu and the closes it fast. The behavior can be replicated on your online demo controls.

Having a look in your js code we figured out that everything happens on following stacktrace:

 

 

- addHandler: function(e, g, h, a) {
        if (!e._events) {
            e._events = {};
        }
        var f = e._events[g];
        if (!f) {
            e._events[g] = f = [];
        }
        var b;
        if ($telerik.useAttachEvent(e)) {
            b = function() {
                var d = {};
                try {
                    d = $telerik._getWindow(e).event;
                } catch (i) {}
                return h.call(e, new Sys.UI.DomEvent(d));
            };
            e.attachEvent("on" + g, b);
        } else {
            if (e.addEventListener) {
                b = function(d) {
                    return h.call(e, new Sys.UI.DomEvent(d)); //  <====== AND HERE, THIS IS FINAL. AFTER THIS, IT BREAKS
                };
                e.addEventListener(g, b, false);  // <========= HERE
            }
        }
        f[f.length] = {
            handler: h,
            browserHandler: b,
            autoRemove: a
        };
        if (a) {
            var c = e.dispose;
            if (c !== $telerik._disposeHandlers) {
                e.dispose = $telerik._disposeHandlers;
                if (typeof (c) !== "undefined") {
                    e._chainDispose = c;
                }
            }
        }
    }

 

- addHandlerForClassName: function(f, b, g) {
        if (typeof (this._eventMap[f]) == "undefined") {
            this._eventMap[f] = {};
            if (this._shouldUseEventCapture(f)) {
                var c = this._getDomEventDelegate();
                var d = this._element;
                var a = function(h) {
                    return c.call(d, new Sys.UI.DomEvent(h));
                };
                this._browserHandlers[f] = a;
                d.addEventListener(f, a, true);
            } else {
                $telerik.addHandler(this._element, f, this._getDomEventDelegate());    // <======= HERE
            }
        }
        var e = this._eventMap[f];
        e[b] = g;
    }

- this._eventMap.addHandlerForClassName("contextmenu", "rsApt", this._onAppointmentContextMenu); 

 

Having the stacktrace above, after

b = function(d) {
    return h.call(e, new Sys.UI.DomEvent(d));
};

the context menu opens and closes (using CTRL + Left CLICK).

The difference of 'd' (mouse event) between 'Right Click' and 'Ctrl + Left Click' I figured out is that when CRTL+ Left CLICK,  d.Buttons = 2 (I suppose that 2 buttons were clicked), d.Button = 2(assume it is left mouse button) and d.CtrlKey = True. We were trying to modify several properties at runtime in debugger but couldn't fix/find the cause.

 

Thanks,

Andrei V.

0
Peter Milchev
Telerik team
answered on 13 Sep 2019, 03:23 PM

Hello Andrei,

We have re-tested the ContextMenus in the demos again with FireFox 68, and it seems that only the Ctrl+Left Click closed the menu immediately. 

Then, we updated FireFox to the latest 69 version and it seems that the context menu works properly with Right click, Ctrl + Left Click, and on all demos, ContexMenu, Grid and Scheduler. 

Can you please confirm that upgrading FireFox resolves the issues?

Regarding the, Ctrl + Left Click in Safari, the menu did flicker as it was in FireFox. The good thing is that it was properly opened with Right Click. We will try to find out if a temporary workaround is available until they hopefully fix it in an upcoming release.

Regards,
Peter Milchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Andrei
Top achievements
Rank 2
answered on 17 Sep 2019, 06:42 AM

Hello Peter,

Yes I can confirm that Firefox 69 resolved the Right Click and CTRL+Click on Mac.

Right Click also works on Safari and the last issue which is still in pending is CTRL+ Click on Safari.

 

Thanks for your response!

Andrei V.

Tags
General Discussions
Asked by
Andrei
Top achievements
Rank 2
Answers by
Peter Milchev
Telerik team
Andrei
Top achievements
Rank 2
Share this question
or