diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUI.java index 1b287b5e..b65b0c2f 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableUI.java @@ -574,7 +574,7 @@ public class DarkTableUI extends DarkTableUIBridge implements TableConstants { } } Component comp = table.getEditorComponent(); - if (comp != null) { + if (comp != null && !(e.getOppositeComponent() == comp || DarkUIUtil.hasFocus(comp))) { Color newBg = CellUtil.getTableBackground(comp, table, true, false, table.getEditingRow()); CellUtil.setupBackground(comp, newBg); } diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/table/renderer/DarkTableCellEditorDelegate.java b/core/src/main/java/com/github/weisj/darklaf/ui/table/renderer/DarkTableCellEditorDelegate.java index 6e5ca302..297e14d7 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/table/renderer/DarkTableCellEditorDelegate.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/table/renderer/DarkTableCellEditorDelegate.java @@ -74,8 +74,8 @@ public class DarkTableCellEditorDelegate extends TableCellEditorDelegate { if (DarkTableUI.ignoreKeyCodeOnEdit((KeyEvent) anEvent, table)) return false; } if (TableConstants.isBooleanRenderingEnabled(table)) { - if (anEvent instanceof MouseEvent) { - return isMouseOverBooleanRenderer((MouseEvent) anEvent, table); + if (anEvent instanceof MouseEvent && isMouseOverBooleanRenderer((MouseEvent) anEvent, table)) { + return true; } } return super.isCellEditable(anEvent);