Column width adjustment issue with custom plugin columns

dstillman Zotero Team
This discussion was created from comments split from: Problem with column width adjustment.
  • @dstillman I have a similar problem, but only with Citation Key column (using Better Bibtex). Should it be fixed by Better Bibtex not Zotero?
  • This behavior starts after BBT calls Zotero.ItemTreeManager.refreshColumns(). If I don't do that, the problem does not appear.
  • The problem is reproducible for @yhkang926 with another (non-BBT) column
    • Uninstall BBT & restart Zotero
    • Open Tools -> Developer -> Run Javascript
    • Paste in Zotero.ItemTreeManager.refreshColumns() and click run
    (The conversation can be found here but since this reproduces without BBT I don't think I need to be involved)
  • edited September 14, 2025
    I've been experiencing the same issue (see discussion here https://github.com/Dominic-DallOsto/zotero-reading-list/issues/27) and think I have found the cause of the issue and a workaround.

    Basically, every time `Zotero.ItemTreeManager.refreshColumns()` is called, a CSS rule is added to the stylesheet for each custom column, setting the `flex-basis` to some value. If `refreshColumns` is called again (when re-adding the custom column or having a different plugin that adds a custom column) then a second instance of this CSS rule is added that somehow conflicts with the first and sets a different `flex-basis` value which causes this buggy column resizing behaviour.

    If you select the custom column header HTML element in the browser debug tools and disable all but the first CSS `flex-basis` rule - everything works again.

    I created a workaround for my plugins here (https://github.com/Dominic-DallOsto/zotero-reading-list/blob/master/src/utils/itemTreeStyleSheetBug.ts) that patches the stylesheet's `insertRule` function (that is called after `refreshColumns`) to ignore the adding of these conflicting CSS rules.

    I guess a proper solution would require editing Zotero custom column API to not add these duplicate CSS rules.
  • I still see the problem with the latest beta.

    Zotero 8.0-beta.25+145fbfa19 (64-bit)
    Windows 11
  • If this happens for you with custom columns added by Zotero plugins, I think the issue described here (https://groups.google.com/g/zotero-dev/c/aM3I-8etB0c) could be responsible, and should hopefully be fixed soon.

    If it still happens without any plugins / custom columns added - then it's probably a different issue.
  • Yes, I observe the problem when custom columns are added by Zotero plugins. In that case, the width of all the columns are resized together, making it impossible to organise them properly.
    Thanks for the detailed report. I have no idea on the technical side, but it seems indeed to be the same problem. Glad to see the progress on it.
  • dstillman Zotero Team
    This should be fixed in current versions of Zotero. If you're still seeing it, provide a Report ID and exact steps to reproduce.
  • 1306266725

    1. Activating scite-zotero-plugin
    2. Adding a column of the plugin
    3. Resizing the column will result in the same "glitchy" behavior, as it tries to expand the bar, especially if the column name is long
Sign In or Register to comment.