button.click() does not trigger extensions (i. e. FileDownloader)

In Grids we’re dynamically rendering the right click context menu via associated buttons which are visible on top of the respecting Grid.
The MenuItem.Command handlers are simply using the click() method of the Button class and works as long as Button.ClickListener is used. However for example a Button for downloading a file which only works via FileDownloader.extend(button) can not be triggered via button.click(). Is this intended or a bug?

You can’t force a browser to download a file without a direct user interaction. It’s a security restriction. Same goes for uploads and opening new browser windows. This also includes not being able to trigger download from a server-side event handler, as those aren’t executed in the same JavaScript scope.


Hi Olli,
many thanks for clarifying this!
Best regards