From 883ce5d12044a40ea7dd649d8d8c34fad44a7cea Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 2 May 2021 15:19:44 +0200 Subject: [PATCH] Fix highlighting of search results when the `textLayer` contains `br`-elements (PR 13257 follow-up, issue 13323) Apparently we need to layout `br`-elements in the same *exact* way as the regular `span`-elements which contain the text-content. --- test/text_layer_test.css | 3 ++- web/text_layer_builder.css | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/text_layer_test.css b/test/text_layer_test.css index aac1afbce..4d8187d47 100644 --- a/test/text_layer_test.css +++ b/test/text_layer_test.css @@ -23,7 +23,8 @@ bottom: 0; line-height: 1; } -.textLayer span { +.textLayer span, +.textLayer br { position: absolute; white-space: pre; -webkit-transform-origin: 0% 0%; diff --git a/web/text_layer_builder.css b/web/text_layer_builder.css index 1dc915544..99c2b2c55 100644 --- a/web/text_layer_builder.css +++ b/web/text_layer_builder.css @@ -24,7 +24,8 @@ line-height: 1; } -.textLayer span { +.textLayer span, +.textLayer br { color: transparent; position: absolute; white-space: pre;