From 2d97f8414d730c6f58033ee65331df10dfc18b54 Mon Sep 17 00:00:00 2001 From: Nick Doiron Date: Fri, 8 Oct 2021 00:36:18 -0400 Subject: [PATCH] turn off svg text path patch on Chromium >=96 --- modules/util/svg_paths_rtl_fix.js | 1 + modules/util/util.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/util/svg_paths_rtl_fix.js b/modules/util/svg_paths_rtl_fix.js index 74cfe28d79..b5e59dbaea 100644 --- a/modules/util/svg_paths_rtl_fix.js +++ b/modules/util/svg_paths_rtl_fix.js @@ -1,5 +1,6 @@ // see https://github.com/openstreetmap/iD/pull/3707 // https://gist.github.com/mapmeld/556b09ddec07a2044c76e1ef45f01c60 +// fixed in Chromium 96.0 https://bugs.chromium.org/p/chromium/issues/detail?id=374526 import { WordShaper } from 'alif-toolkit'; diff --git a/modules/util/util.js b/modules/util/util.js index 388ba7261d..e078647e6c 100644 --- a/modules/util/util.js +++ b/modules/util/util.js @@ -225,8 +225,9 @@ export function utilDisplayName(entity) { export function utilDisplayNameForPath(entity) { var name = utilDisplayName(entity); var isFirefox = utilDetect().browser.toLowerCase().indexOf('firefox') > -1; + var isNewChromium = Number(utilDetect().version.split('.')[0]) >= 96.0; - if (!isFirefox && name && rtlRegex.test(name)) { + if (!isFirefox && !isNewChromium && name && rtlRegex.test(name)) { name = fixRTLTextForSvg(name); }