TWebPopupmenu appears and then immediately disappears on FNCGrid

Hi Bruno,

We have an issue where the right-click menu for an FNCGrid appears, and then immediately disappears, which is a problem for our application development. I have attached the following demonstration project to illustrate this issue. We have included a video showing the behaviour as well.

Here is how to replicate the issue in our demonstration project:

  1. Click the button labelled “click to fire popup”.

  2. Click on any cell to select the cell, but do not click again to enter edit mode. Then right-click, and the right-click menu will show without any issues. The video shows this happening a few times.

  3. Now, click on a cell twice, to enter cell editing mode (so that a blinking claret appears).

  4. Now, click out of that cell to select any other cell (but don’t click twice - that is, do not enter editing mode).

  5. Now, try to right-click. The right-click menu will appear but disappear immediately, rendering it non-usable. The video shows this toward the end.

Note that in our testing, we have found that this only occurs on Mac OS using Chrome and Chrome-engine browsers (like MS Edge). We have found that on Windows OS, the issue does not occur. We realize that Mac OS may represent a potentially smaller use audience, but we hope that you can identify and fix this issue in timely fashion, irrespective.

Demo project is here:
44. Rightclick .zip (1.4 MB)

Video is attached below:
rightclick_Video.zip (821.2 KB)

Thanks in advance,

We are able to reproduce this, and are looking for a solution.

Hi Pieter,

It appears that the issue has returned after we updated TMS and FNC to their most recent versions. Could you kindly investigate this?

Thanks,

Same circumstances as original post?

Yes, it is the same issue described in original post.

I have also made a link so that you can have a quick test on Mac OS platform: TMS Web Project

There is also a video here: https://www.dropbox.com/scl/fi/srewf13t3qja2he4fx7gs/test.mp4?rlkey=5of22tw4jsna0rk68i8dtw71p&st=pohybpzo&dl=0
You will find out that the issue occurs at around 30 sec in the video.

Thanks,

We will reopen this case.

Hi,

Can you try and comment CaptureEx in WEBLib.TMSFNCCustomGrid.pas, rebuild your application and see if that helps?

procedure TTMSFNCCustomGrid.HandleMouseDown(Button: TTMSFNCMouseButton; Shift: TShiftState; X,
  Y: Single);
...
  if CanFocus then
    SetFocus;

//  CaptureEx;

  if not (Button = {$IFNDEF WEBLIB}TTMSFNCMouseButton.{$ENDIF}mbLeft) then
    Exit;

Hi Pieter,

I tried your suggestion and unfortunately I still see the issue.

Here is updated demo link based on your advice: TMS Web Project

Any other ideas?

Thanks,

Hi there,

Any update regarding this issue?

Thanks

Hi,

Unfortunately it's difficult to pinpoint the exact cause. On Safari, it's not reproducible, only on Chrome and only on macOS. Seems to be browser dependent. We'll continue investigation.