[Issue8871] Do not open disabled localized combobox when clicking on it

This commit is contained in:
Gabor Hodi
2022-01-23 18:51:14 +01:00
parent 97ed56bc3a
commit 2ecce0e47e
2 changed files with 3 additions and 1 deletions

View File

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

View File

@@ -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) {