When pasting content that exceeds a certain height, Quill will automatically scroll to the top on webkit-based browsers such as Chrome

This was my original query here

I've been attempting to recreate the auto-grow functionality showcased in their interactive playground

My approach involved adding a scrolling container and setting specific heights for elements, however,

You can also view a live demonstration on codesandbox here

Upon pasting a large amount of content, the page unexpectedly scrolls back to the top of the editor... resulting in a rather disruptive user experience.

Answer №1

The issue with scrolling back to the top when dealing with a large amount of text seemed impossible to resolve using the Autogrow example in Quill.

However, after some experimentation, version 2.0.0 is set to provide a perfect solution for this problem.

As of May 22, 2021, the most recent version available is 2.0.0-dev.4

yarn add <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="38494d515454780a16081608155c5d4e160c">[email protected]</a>
// or
npm install <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b9c8ccd0d5d5f98b9789978994dddccf978d">[email protected]</a>

To see a demonstration, you can check out the CodeSandbox example:

https://codesandbox.io/s/importing-sass-in-vue-forked-cp8jn?file=/src/components/HelloWorld.vue

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

One can use basic JavaScript or jQuery code for a straightforward solution

I am facing an issue. While I have a good grasp of HTML, CSS, PHP, and design, I lack knowledge in JavaScript and jQuery. There's a simple jQuery function that I need to implement, but I am unsure about how to go about it. The task at hand is to acce ...

Receiving a 401 error code stating "unauthorized" when attempting to invoke a method using AJAX in .NET

I am working on a .NET project within the framework 4.5.1 When I incorporate ajax as shown below, the debugger successfully hits the page_load event: $.ajax({ "async": true, "crossDomain": true, type: "POST", url: "Advance ...

Convert form data into a JSON object utilizing JQuery and taking into account nested JSON objects

Currently, I am facing an issue while extracting data for submission using the jQuery `serializeArray()` function. This function works efficiently by providing an array of { name: value } objects, where the name corresponds to the elements in the form. How ...

A step-by-step guide on enabling Autoclick for every button on a webpage

I am currently using Jquery and Ajax to carry out an action, my goal is for a code to automatically click on every button once the page has finished loading. Although I attempted to use the following javascript code to achieve this at the end of my page, ...

"React Antd Element Type Validation Failure: received an unexpected object instead of the required element type. Issue

I recently upgraded from antd version 3.7.0 to the latest version 3.23.4 and now I'm encountering a strange error: Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite co ...

Extracting cache-control header value from server response

Looking to interpret the cache-control header response in order to utilize it for caching the API response. Here is an example of the response headers: {"x-backside-transport":"OK OK","connection":"close","transfer-encoding":"chunked","access-control-all ...

Allowing certain routes to be processed by Groovy while others are managed by react-router v4

I'm currently dealing with a situation where the backend Groovy code contains controllers that render GSP (Groovy Server Pages), while for the frontend we're utilizing react-router v4 to manage routes. The issue that I am facing is that when defi ...

Error: Node.js encountered an unexpected identifier in the syntax

I'm encountering an issue with my web application. The error keeps popping up. app.get("/campground/:id/comments/new",function(req,res){ camp.findById(req.params.id)({ if(err) console.log(err); else ...

In Laravel, the collection will consistently provide an object as opposed to an array

I am currently working on a news page that is being loaded with Vue and Vue Isotope. The challenge I'm facing is related to the data format required by Vue Isotope, which needs my data to be in an array so that I can add more articles to the isotope w ...

Showing various pictures using numerous buttons in JavaScript

Looking for some assistance with my JavaScript project. I am new to coding and trying to create a program that displays different images when buttons are clicked. Can anyone lend a hand? Here's the code I have so far: <html> <body> < ...

Having issues with rendering my images on Nuxt framework

In the midst of configuring the routing for my Nuxt project, I've encountered challenges with nesting specific folders to achieve a route structure like this: "/PageAccueil/PricingPage/Checkout123". The issue arises when attempting to place the "Pric ...

Guide to embed a Google Sheets chart into a WordPress website

I'm looking to include a chart in a wordpress post, using the script generated from google sheets' publish function. When I add the script to a generic HTML page, the chart displays properly. However, when I insert it into a wordpress post, I en ...

In Reactjs, you can prevent users from selecting future dates and times by modifying the KeyboardDateTimePicker component

I am currently using the Material UI KeyboardDateTimePicker component and have successfully disabled future dates with the disabledFuture parameter. However, I am now looking for a way to disable future times as well. Any suggestions or solutions would b ...

Is your YQL JSON script failing to provide the expected output?

Here is a script that I have copied almost directly from this. Why is it that the code below does not seem to return anything? ajax.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html dir="lt ...

Displaying child properties in a functional ReactJS component

React version 0.14 introduces the concept of pure functional components, ensuring that the same input always results in the same output. Props are passed as function arguments. // Using ES6 arrow functions with implicit return: const PureComponent = ({url ...

Is it common for the vuetify main.sass bundle file to have a gzipped size of 30 kilobytes?

Just a quick question: Is the file size considered normal? Will it still contain all component stylings even if removed by treeshaking? Treeshaking is enabled. Any advice would be greatly appreciated! https://i.stack.imgur.com/VKaQQ.png ...

The dependability of the onbeforeunload function

Is the event window.onbeforeunload considered reliable? Does it trigger in all popular browsers? Will it still trigger if the client browser crashes? Can it effectively postpone the close event if more time is needed, or does it get interrupted? Are the ...

Search through the JSON data, identify similar values, and save them in a collection

Struggling to find a way to limit the output of my comparison between attribute values in an object, I am only looking for one output per ID. Any suggestions? //example JSON var obj1 = { "Summary" : [ { "ID" : "1234", "Name" : "Joh ...

Exploring the functionality of the JQuery Chained plugin for bidirectional chaining

Let's tackle a simple problem involving car brands and models. Take the example below: <select id="brand"> <option value="">Choose</option> <option value="audi" class="a1 a3 a4">Audi</option> <option value ...

How can I implement a CSS property on a child class when the parent class is toggled on and off?

Looking to style a child div within a parent div that toggles classes based on a flag. The parent div can have either the .pricing-section or .new-pricing-section class. Here's the structure of the parent div: const togglePriceSection = isPricingDetai ...