Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Prevent that the focus outline overflows the table cell (#31214)

Henriette Dinger5d7a1a8bff05
diff --git a/app/assets/stylesheets/content/work_packages/_table_content.sass b/app/assets/stylesheets/content/work_packages/_table_content.sass
index a084582ae91..2356b1a9e32 100644
--- a/app/assets/stylesheets/content/work_packages/_table_content.sass
+++ b/app/assets/stylesheets/content/work_packages/_table_content.sass
@@ -122,8 +122,11 @@ html:not(.-browser-mobile)
.wp-table--cell-container
@extend .ellipsis
+ display: inline-block
+ vertical-align: middle
.wp-table--cell-td.-editing &
display: block
+ width: initial !important
.inline-edit--display-field
display: initial
diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts
index 497f95a84b4..0e0285789eb 100644
--- a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts
+++ b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts
@@ -14,6 +14,7 @@ export const indicatorCollapsedClass = '-hierarchy-collapsed';
export const hierarchyCellClassName = 'wp-table--hierarchy-span';
export const additionalHierarchyRowClassName = 'wp-table--hierarchy-aditional-row';
export const hierarchyIndentation = 20;
+export const hierarchyBaseIndentation = 25;
export class SingleHierarchyRowBuilder extends SingleRowBuilder {
// Injected
@@ -126,6 +127,8 @@ export class SingleHierarchyRowBuilder extends SingleRowBuilder {
// Assure that the content is still visble when the hierarchy indentation is very large
jRow.find('td.subject').css('minWidth', 125 + (hierarchyIndentation * hierarchyLevel) + 'px');
+ jRow.find('td.subject .wp-table--cell-container')
+ .css('width', 'calc(100% - ' + hierarchyBaseIndentation + 'px - ' + (hierarchyIndentation * hierarchyLevel) + 'px)');
}
/**
@@ -134,7 +137,7 @@ export class SingleHierarchyRowBuilder extends SingleRowBuilder {
private buildHierarchyIndicator(workPackage:WorkPackageResource, jRow:JQuery | null, level:number):HTMLElement {
const hierarchyIndicator = document.createElement('span');
const collapsed = this.wpTableHierarchies.collapsed(workPackage.id!);
- const indicatorWidth = 25 + (hierarchyIndentation * level) + 'px';
+ const indicatorWidth = hierarchyBaseIndentation + (hierarchyIndentation * level) + 'px';
hierarchyIndicator.classList.add(hierarchyCellClassName);
hierarchyIndicator.style.width = indicatorWidth;
hierarchyIndicator.dataset.indentation = indicatorWidth;