fix code formatting problems and manage to get nodeType for element with or without children and assign mouseDown, mouseOver, mouseOUt event to this.qiPanel instead of frame (issue5720)