浏览代码

fixed textinput within mask

Nicolas Cannasse 3 年之前
父节点
当前提交
60e66bc92f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h2d/TextInput.hx

+ 1 - 1
h2d/TextInput.hx

@@ -372,7 +372,7 @@ class TextInput extends Text {
 	override function draw(ctx:RenderContext) {
 		if( inputWidth != null ) {
 			var h = localToGlobal(new h2d.col.Point(inputWidth, font.lineHeight));
-			ctx.pushRenderZone(absX, absY, h.x - absX, h.y - absY);
+			ctx.clipRenderZone(absX, absY, h.x - absX, h.y - absY);
 		}
 
 		if( cursorIndex >= 0 && (text != cursorText || cursorIndex != cursorXIndex) ) {