-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hiddentextarea auto scroll the page #2904
Comments
i think you must keep it like that with position fixed and do not focus it :
|
HiddenTextarea must move around the itext object to serve composition purposes. |
this.initHiddenTextarea(e); if the canvas size is big and double click on a textbox to edit it it, the whole page is getting scrolled to position of this textbox. |
please make a demo on 1.6.1
|
I believe I have the same issue. This is the demo: Usecase: Hope it helps. |
I will see if with the logic of getPointer we can also move the textArea better. @keanass can you please also make a demo to check if the issue is the same? |
The webpage scrolls also in a canvas with zoom < 1 (Chrome). Add a 600x400 canvas. Workaround: I changed initHiddenTextarea and _updateTextarea considering zoom at "p" point:
|
this is really annoying, had to solve this by setting p.x=0 on initHiddenTextarea and _updateTextarea. |
I'm seeing a similar issue, can be seen on http:https://fabricjs.com/kitchensink as well. If you add a long enough single text line it pushes the page over when it reaches the browser window. The work around I added was preventing the textarea from positioning itself outside of the canvas, which seemed to work for my use case. However I'm not using zoom or css resizing. |
for sure canvas zooming is something to solve. for the css i do not know if i can help somehow. Maybe we should have a paramerer to have it fixed(no mobile support) and repositioning (issues with big pages and css) |
Adding this css worked well for me: opinion: Unless the project is built entirely on fabricjs, then a lot of projects will already have a solution inlace to zoom to the input or create space for the on screen keyboard. Thus, it seems to me this feature should either not be a part of fabricjs, or there should be an easy option to disable it. In my use case, disabling this feature worked better on iOS and the desktop browser. |
i added a special attribute to the textarea to allow people to interact with it in some way. |
|
Hiddentextarea is scrolling the webpage when double click it to modify the text content in latest version of fabric, it maded for ios to show the keyboard but that takes effect also in computer browsers.
The text was updated successfully, but these errors were encountered: