Skip to content

Commit

Permalink
Merge pull request #8741 from Georeactor/rtl-unfix
Browse files Browse the repository at this point in the history
Turn off RTL text patch on Chromium >=96
  • Loading branch information
jfirebaugh authored Oct 17, 2021
2 parents 7699034 + 2d97f84 commit 19c9524
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/util/svg_paths_rtl_fix.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
3 changes: 2 additions & 1 deletion modules/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 19c9524

Please sign in to comment.