@@ -1021,11 +1021,11 @@ pub const Page = struct {
10211021 if (std .mem .eql (u8 , new_key , "Dead" )) {
10221022 return ;
10231023 }
1024- log .debug (.input , "key down event" , .{ .tag = tag , .key = new_key });
10251024 switch (tag ) {
10261025 .input = > {
10271026 const element : * parser.Element = @ptrCast (node );
10281027 const input_type = try parser .inputGetType (@ptrCast (element ));
1028+ log .debug (.input , "key down on input" , .{ .tag = tag , .key = new_key , .input_type = input_type });
10291029 if (std .mem .eql (u8 , new_key , "Enter" )) {
10301030 const form = (try self .formForElement (element )) orelse return ;
10311031 return self .submitForm (@ptrCast (form ), null );
@@ -1038,14 +1038,17 @@ pub const Page = struct {
10381038 }
10391039 },
10401040 .textarea = > {
1041+ log .debug (.input , "key down on textarea" , .{ .tag = tag , .key = new_key });
10411042 const value = try parser .textareaGetValue (@ptrCast (node ));
10421043 if (std .mem .eql (u8 , new_key , "Enter" )) {
10431044 new_key = "\n " ;
10441045 }
10451046 const new_value = try std .mem .concat (self .arena , u8 , &.{ value , new_key });
10461047 try parser .textareaSetValue (@ptrCast (node ), new_value );
10471048 },
1048- else = > {},
1049+ else = > {
1050+ log .debug (.input , "key down event" , .{ .tag = tag , .key = new_key });
1051+ },
10491052 }
10501053 }
10511054
0 commit comments