turn off svg text path patch on Chromium >=96

This commit is contained in:
Nick Doiron
2021-10-08 00:36:18 -04:00
parent a018d276eb
commit 2d97f8414d
2 changed files with 3 additions and 1 deletions

View File

@@ -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';

View File

@@ -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);
}