Open ittayd opened 8 months ago
Note: this also happens if I use StaticCanvas
which editor @ittayd where do i have to type?
There's a pencil icon that opens an editor. It's in step 2 in the description above
Are you using a Canvas or a staticCanvas? An editable text editor? Are you linking the hiddenTextarea to the upper textbox?
Both The text is editable, but it's not a text area. I don't understand the question.
Without seeing the code is not clear to me what is going on. If you use fabricjs editable text there is a constant focus shift on the textarea when you type that could cause the scroll up, that is why i m asking.
There is code, if you follow my instructions you will see it. in https://jump2.tiddlyhost.com/, edit. The wiki content is the fabric code.
Is not that don't follow the instructions. this is all i can find:
So all the code does is:
let canvas = new window.fabric.Canvas(id, options)
where id is a unique identifier (not assigned to any node in the dom) and options is empty in this caseOk i understood how to see it now. It must have to do with how fabricJS attach itself to the dom. What framework is rendering that wiki? is it a react app or something else?
The wiki is the framework. For example, as mentioned, it attaches the canvas wrapperEl element to the DOM. Note that I believe the canvas is detached until the widget (that's the thing that implements the handling for $fabric) attaches it (third bullet above)
CheckList
Version
6.0.0-beta18
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
None
Link To Reproduction
https://jump2.tiddlyhost.com/
Steps To Reproduce
First, I assume this is a niche issue, so feel free to close if you don't want to deal with it. I tried to find the root cause and couldn't. Note this is something I hacked together to show the problem, so ignore the fact its narrow and may be unusable as a real wiki.
Result: the preview jumps to the top.
Result: no jump.
So the jump is not a result of placing a canvas (that the other library does as well)
Note that the way the wiki works is by redrawing (recreating elements) after somthing is types (with a small delay )
Expected Behavior
No jumps
Actual Behavior
Jumps
Error Message & Stack Trace
No response