Why did I click on the top left corner of the 'goBtn' button but execute layer's 'pointerup' event?

From the name of these two containers: dialog and layer. It seems that you are trying to build some ui components placed on a layer.
Here is a plugin for ui components. What kind of features would you expect for a layer object?