fix: prevent error when autoscrolling in FloatingButtons #16061
+34
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
Before submitting, make sure you've checked the following:
dev
branch.Changelog Entry
Description
TypeError
andDOMException
errors in the console when navigating to a new chat while a local model was generating a response in the "Ask" or "Explain" modal.Changed
askHandler
andexplainHandler
functions inFloatingButtons.svelte
now store theAbortController
for thefetch
request.onDestroy
lifecycle hook has been added toFloatingButtons.svelte
to abort thefetch
request when the component is unmounted.try...catch
blocks inaskHandler
andexplainHandler
have been updated to gracefully handleDOMException
errors with the nameAbortError
.Fixed
autoScroll
function inFloatingButtons.svelte
now checks if theresponseContainer
element exists before attempting to access its properties.Additional Information
TypeError: can't access property "scrollHeight", responseContainer is null
when navigating away from ask/explain modal as model is responding #16057Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.