-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
This is an AI generated summary of some investigation I did on an issue I was having. I wanted to pass it along.
Core Finding:
We've identified a conflict between KTL's _cmr scroll restoration and a native Knack layout feature. When a Knack application is set to a "Max Width" layout (instead of "Full Width"), Knack automatically adds an is-constrained class to table wrappers (.kn-table-wrapper).
The Conflict:
This automatically-applied is-constrained class interferes with KTL's scroll restoration mechanism. The sequence is as follows:
KTL's _cmr action refreshes the table view.
KTL's refreshView function correctly records the scrollTop of the .kn-table-wrapper.
Knack re-renders the table.
Because the application is set to "Max Width," Knack's native renderTableSizingOptions function runs and re-applies the is-constrained class to the wrapper.
This final step appears to reset the wrapper's layout, invalidating the restored scroll position and causing the table to jump to the top.
Conclusion:
The issue is not a bug in KTL but a direct conflict with an implicit, uncontrollable Knack rendering behavior tied to the global application layout setting. A potential enhancement for KTL could be for the refreshView function to check for the is-constrained class and, if present, delay its scroll restoration slightly or re-apply it after a short timeout to ensure it is the absolute last action performed on the container.