Evgeniy OZ

Results 131 comments of Evgeniy OZ

@flackr `focus()` and `scrollIntoView()` might be quite different. Here you can see how Safari iOS (in the emulator) scrolls an input on focus, and the difference with `scrollIntoView()`: ### Focus:...

@flackr almost ;) If we tap the input after `scrollIntoView({block: 'nearest'})`, it still scrolls a bit: https://github.com/user-attachments/assets/1d2c7bb6-cbd4-489b-9728-5476cabf7678 `focus()`, for comparison: https://github.com/user-attachments/assets/cd4a4375-3a77-4419-bd6a-16ecb80160a1 But perhaps it’s just peculiarities of Safari’s implementation.

@flackr in the first video (from my previous comment), when I click “Add” and the form is displayed, I call `scrollIntoView({block: 'nearest'})` for the first input field (sorry that the...

@roschlau in the code you provided, what represents the "input on the component"? If it's `sourceSignal()`, then you don't need to use `effect()`, `computed()` will create a new resource (with...

@roschlau as an option: ``` let currentResource = undefined; const resource = computed(() => { currentResource?.destroy(); currentResource = createSomeResource(sourceSignal()); return currentResource; }); ```

```ts protected readonly editor = linkedSignal({ source: () => ({ fragment: this.fragment(), hocuspocus: this.hocuspocus(), domAttrs: this.attrs(), }), computation: (data, prev) => { if (prev?.value) { untracked(prev.value.destroy); } return this.tiptapEditors.createEditor( data.fragment,...

> adding even more pieces to the solution Your solution has memory leaks, so it should be changed anyway. I would just wrap that created result in an injectable class...

@roschlau Yes, you are right, I misread one of your comments. To resolve that issue #2 you can just add: ```ts ngOnDestroy() { this.editor()?.destroy(); } ``` Better than having an...

My humble opinion: both HttpClient and interceptors should be executed only in `untracked()`.