diff --git a/CHANGELOG.md b/CHANGELOG.md index 04cb4d714..ccf5cdf59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :white_check_mark: Validation #### :bug: Bugfixes * Refresh numeric input fields after leaving focus with the value that is stored in the tag ([#11027]) +* Fix oneway field falsely showing "Assumed to be Yes" if cycled through all options back to the default state #### :earth_asia: Localization #### :hourglass: Performance #### :mortar_board: Walkthrough / Help diff --git a/modules/ui/fields/check.js b/modules/ui/fields/check.js index 378b9f0eb..2556e35d2 100644 --- a/modules/ui/fields/check.js +++ b/modules/ui/fields/check.js @@ -1,13 +1,15 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; - import { select as d3_select } from 'd3-selection'; +import { omit } from 'lodash-es'; import { utilRebind } from '../../util/rebind'; import { t } from '../../core/localizer'; import { actionReverse } from '../../actions/reverse'; import { svgIcon } from '../../svg/icon'; +import { utilCheckTagDictionary } from '../../util'; +import { osmOneWayTags } from '../../osm/tags'; export { uiFieldCheck as uiFieldDefaultCheck }; export { uiFieldCheck as uiFieldOnewayCheck }; @@ -60,7 +62,7 @@ export function uiFieldCheck(field, context) { // where implied oneway tag exists (e.g. `junction=roundabout`) #2220, #1841 if (field.id === 'oneway') { var entity = context.entity(_entityIDs[0]); - if (entity.type === 'way' && entity.isOneWay()) { + if (entity.type === 'way' && !!utilCheckTagDictionary(entity.tags, omit(osmOneWayTags, 'oneway'))) { _impliedYes = true; texts[0] = t.html('_tagging.presets.fields.oneway_yes.options.undefined'); }