addKeyListener
utility makes overrides difficult in TreeWidget
#11640
Labels
extensibility
issues to simplify ability to extend Theia
tree
issues related to the tree (ex: tree widget)
Bug Description:
It seems that the native
KeyboardEvent
listeners attached by theaddKeyListener
utility always fire before listeners attached by React, even if the React listeners occur on a child element and callevent.stopPropagation()
. That is bad enough. However,addKeyListener
itself will call.preventDefault()
and.stopPropagation()
if thereturn
value of the handler is notfalse
. That means that the listener attached to the child on the React side may never be called if the native event handler returns aPromise
for example.Steps to Reproduce:
TreeWidget
whose node includes a focusable element with akeyDown
handler that calls.stopPropagation()
.Additional Information
The text was updated successfully, but these errors were encountered: