Skip to content

Commit

Permalink
fix: better width fallback for sidebar url ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Dec 5, 2024
1 parent 3d0b78f commit b2aec82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/scripts/components/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ angular.module("korpApp").component("sidebar", {
.find(".sidebar_url")
.css("white-space", "nowrap")
.each(function () {
const totalWidth = $(this).parent().width() || 0
// TODO This happens before sidebar is actually showing, so parent width is 0 the first time
const totalWidth = $(this).parent().width() || 240
// Drop the scheme part ("https://")
let text = $(this)
.text()
Expand Down

0 comments on commit b2aec82

Please sign in to comment.