mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
[Issue8871] Do not open disabled localized combobox when clicking on it
This commit is contained in:
@@ -77,6 +77,7 @@ export function uiCombobox(context, klass) {
|
||||
|
||||
function mousedown(d3_event) {
|
||||
if (d3_event.button !== 0) return; // left click only
|
||||
if (input.classed('disabled')) return;
|
||||
_tDown = +new Date();
|
||||
|
||||
// clear selection
|
||||
@@ -95,6 +96,7 @@ export function uiCombobox(context, klass) {
|
||||
function mouseup(d3_event) {
|
||||
input.on('mouseup.combo-input', null);
|
||||
if (d3_event.button !== 0) return; // left click only
|
||||
if (input.classed('disabled')) return;
|
||||
if (input.node() !== document.activeElement) return; // exit if this input is not focused
|
||||
|
||||
var start = input.property('selectionStart');
|
||||
|
||||
@@ -213,7 +213,7 @@ export function uiFieldLocalized(field, context) {
|
||||
localizedInputs.selectAll('button, input')
|
||||
.classed('disabled', !!isLocked)
|
||||
.attr('readonly', isLocked || null);
|
||||
|
||||
selection.selectAll('.combobox-caret').classed('nope', true);
|
||||
|
||||
|
||||
function addNew(d3_event) {
|
||||
|
||||
Reference in New Issue
Block a user