Skip to content

Fix InputEvent handling order in ViewportContainer

Rafał Mikrut requested to merge github/fork/logicor-cn/3.0-dev into 3.0

Created by: logicor-cn

See #25525

UI components inside a contained Viewport are expected to follow the same global InputEvent handling order, which means _input function in any Node shall be honored first, then _gui_input function of those under the cursor / focus.

However, currently implementation of ViewportContainer uses its _input to capture events for both _input and _gui_input of UI Control under contained Viewport. Effectively giving their _gui_input the priority of _input. This could:

  1. Errornously triggle _gui_input UI Control inside contained Viewport
  2. Errornously block _gui_input UI Control from receiving due event. (Due to event being consumed by 1)

Separate the event delivery between ViewportContainer and Viewport into _input and _gui_input so proper InputEvent handling order is restored.

Merge request reports

Loading