Pcbnew gets an assertion when placing a component directly from pcbnew

Description

On Pcbnew while placing an arbitrary footprint directly from pcbnew it throws an assertion upon placing it. I would expect that the componet is placed with no errors.

ASSERT INFO:
../src/common/wincmn.cpp(3270): assert "!wxMouseCapture::IsInCaptureStack(this)" failed in CaptureMouse(): Recapturing the mouse in the same window?

BACKTRACE:
[1] wxWindowBase::CaptureMouse()
[2] make_fcontext

Steps to reproduce

  1. Create a new project (also happens on existing projects)
  2. Open Pcbnew
  3. Click "Add footprint(Q)"
  4. Pick any footprint
  5. Place it anywhere
  6. Assertion is thrown

KiCad Version

Application: KiCad

Version: 5.99.0-unknown-r25261-07d4a280, debug build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.71.1 OpenSSL/1.1.1i-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh/0.9.5/openssl/zlib nghttp2/1.41.0

Platform: Linux 5.10.8-200.fc33.x86_64 x86_64, 64 bit, Little endian, wxGTK, gnome-xorg, x11

Build Info:
	Date: Jan 20 2021 18:41:43
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.73.0
	OCC: 7.5.0
	Curl: 7.71.1
	ngspice: 33
	Compiler: GCC 10.2.1 with C++ ABI 1014

Build settings:
	KICAD_SCRIPTING=ON
	KICAD_SCRIPTING_MODULES=ON
	KICAD_SCRIPTING_PYTHON3=ON
	KICAD_SCRIPTING_WXPYTHON=ON
	KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
	KICAD_SCRIPTING_ACTION_MENU=ON
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON
	KICAD_STDLIB_DEBUG=OFF
	KICAD_STDLIB_LIGHT_DEBUG=OFF
	KICAD_SANITIZE=OFF