2
0
Эх сурвалжийг харах

Fix CDB editor swallowing key events in Level3D

trethaller 7 жил өмнө
parent
commit
9296a33574

+ 1 - 0
hide/comp/cdb/Editor.hx

@@ -23,6 +23,7 @@ class Editor extends Component {
 		super(root);
 		this.undo = new hide.ui.UndoHistory();
 		this.sheet = sheet;
+		root.attr("tabindex", 0);
 		keys = new hide.ui.Keys(root);
 		keys.addListener(onKey);
 		keys.register("search", function() {

+ 2 - 0
hide/ui/View.hx

@@ -93,6 +93,8 @@ class View<T> extends hide.comp.Component {
 			return true;
 		}
 		for( el in root.find("[haskeys=true]").add(root).elements() ) {
+			if(el.has(active).length == 0 && el[0] != active)
+				continue;
 			var keys = hide.ui.Keys.get(el);
 			if( keys == null ) continue;
 			if( keys.processEvent(e,props) )