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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
ensure most recent dom element is used on resizing
ulferts6b1939edd782
diff --git a/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.ts b/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.tsindex 50adfecc7d4..31b05f6afee 100644--- a/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.ts+++ b/frontend/src/app/shared/components/resizer/resizer/wp-resizer.component.ts@@ -84,7 +84,10 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, AngOnInit() {// Get element- this.resizingElement = <HTMLElement>document.getElementsByClassName(this.elementClass)[0];+ // We use this more complicated approach of taking the last element of the class as it allows+ // to still work in case an element is duplicated by Angular.+ const elements = document.getElementsByClassName(this.elementClass);+ this.resizingElement = <HTMLElement>elements[elements.length - 1];// Get initial width from local storage and applyconst localStorageValue = this.parseLocalStorageValue();