mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Fix issue where clicking some buttons would clear the URL hash
This commit is contained in:
@@ -114,7 +114,6 @@ export function uiFieldCheck(field, context) {
|
||||
enter
|
||||
.append('button')
|
||||
.attr('class', 'reverser' + (reverserHidden() ? ' hide' : ''))
|
||||
.attr('href', '#')
|
||||
.append('span')
|
||||
.attr('class', 'reverser-span');
|
||||
}
|
||||
|
||||
@@ -104,7 +104,8 @@ export function uiSectionBackgroundDisplayOptions(context) {
|
||||
.attr('class', 'display-option-resetlink')
|
||||
.attr('href', '#')
|
||||
.html(t.html('background.reset_all'))
|
||||
.on('click', function() {
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
for (var i = 0; i < _sliders.length; i++) {
|
||||
updateValue(_sliders[i], 1);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,8 @@ export function uiSectionMapFeatures(context) {
|
||||
.attr('class', 'feature-list-link')
|
||||
.attr('href', '#')
|
||||
.html(t.html('issues.disable_all'))
|
||||
.on('click', function() {
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.features().disableAll();
|
||||
});
|
||||
|
||||
@@ -42,7 +43,8 @@ export function uiSectionMapFeatures(context) {
|
||||
.attr('class', 'feature-list-link')
|
||||
.attr('href', '#')
|
||||
.html(t.html('issues.enable_all'))
|
||||
.on('click', function() {
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.features().enableAll();
|
||||
});
|
||||
|
||||
|
||||
@@ -46,7 +46,8 @@ export function uiSectionValidationRules(context) {
|
||||
.attr('class', 'issue-rules-link')
|
||||
.attr('href', '#')
|
||||
.html(t.html('issues.disable_all'))
|
||||
.on('click', function() {
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.validator().disableRules(_ruleKeys);
|
||||
});
|
||||
|
||||
@@ -55,7 +56,8 @@ export function uiSectionValidationRules(context) {
|
||||
.attr('class', 'issue-rules-link')
|
||||
.attr('href', '#')
|
||||
.html(t.html('issues.enable_all'))
|
||||
.on('click', function() {
|
||||
.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.validator().disableRules([]);
|
||||
});
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ export function uiSectionValidationStatus(context) {
|
||||
resetIgnored.select('a')
|
||||
.html(t('inspector.title_count', { title: t.html('issues.reset_ignored'), count: ignoredIssues.length }));
|
||||
|
||||
resetIgnored.on('click', function() {
|
||||
resetIgnored.on('click', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
context.validator().resetIgnoredIssues();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user