Focus moves to dialog after remove child from dialog content

Steps to reproduce:

  1. make simple tool with following code
  
local vb = renoise.ViewBuilder()  
local text1 = vb:text { text = "text1" }  
local text2 = vb:text { text = "text2" }  
local view = vb:column { text1, text2 }  
renoise.app():show_custom_dialog("", view, function()  
 print("key pressed")  
end)  
  
local handler  
handler = function()  
 if renoise.song().transport.edit_pos.line > 1 then  
 renoise.tool().app_idle_observable:remove_notifier(handler)  
  
 view:remove_child(text2)  
 end  
end  
  
renoise.tool().app_idle_observable:add_notifier(handler)  
  
  1. place cursor at first line in pattern editor
  2. reload tool
  3. move cursor to second line by pressing down-arrow-key - focus move to dialog window

With opened scripting terminal easy to see that focus is on dialog window: press again down-arrow-key and “key pressed” will print

regularity found: focus changes only if window (auto)resized after remove

workaround: use vertical_aligner or horizontal_aligner as top container instead of column and row