-
Notifications
You must be signed in to change notification settings - Fork 326
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
Preserve cursor position in editors #3485
Commits on May 18, 2024
-
Create setter and getter methods for cursor position
Setter takes a 'view', grabs the current cursor position, and dumps it into localStorage with a related key. Getter takes a 'view', loads the related localStorage key, and *if* an editor instance is focused, sets the cursor position in it. The CM instance must have focus on it already-- related code is in next commit.
Configuration menu - View commit details
-
Copy full SHA for 5053e64 - Browse repository at this point
Copy the full SHA 5053e64View commit details -
add getter & setters into lifecycle
When the component is mounted, it focuses the editor and the getter method to set the cursor. It checks for a CM instance first, to avoid issues with properties editor. When component is unmounted, it saves the cursor position.
Configuration menu - View commit details
-
Copy full SHA for 78cde85 - Browse repository at this point
Copy the full SHA 78cde85View commit details -
set and get cursor position on view change
When the view/editor changes (text to style etc), the current view cursor is saved, and the new view cursor is loaded.
Configuration menu - View commit details
-
Copy full SHA for a3f5a09 - Browse repository at this point
Copy the full SHA a3f5a09View commit details
Commits on May 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b743a54 - Browse repository at this point
Copy the full SHA b743a54View commit details
Commits on May 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c9b8ac2 - Browse repository at this point
Copy the full SHA c9b8ac2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0a3584 - Browse repository at this point
Copy the full SHA b0a3584View commit details -
Merge branch 'preserve-cursor-position' of https://github.com/Gazook8…
…9/homebrewery into preserve-cursor-position
Configuration menu - View commit details
-
Copy full SHA for 3ad1193 - Browse repository at this point
Copy the full SHA 3ad1193View commit details
Commits on Sep 2, 2024
-
setCursor beforeunload to save pos before leaving
Add a 'beforeunload' event listener to watch for the user leaving the page so that the cursor position can be saved between page reloads. For reliability, the setStoredCursorPosition method now returns null, which when run through the beforeunload listener triggers it, without opening a window prompt.
Configuration menu - View commit details
-
Copy full SHA for 3232db6 - Browse repository at this point
Copy the full SHA 3232db6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ecc587 - Browse repository at this point
Copy the full SHA 4ecc587View commit details -
Just updating the old ref syntax to thew newer createRef syntax.
Configuration menu - View commit details
-
Copy full SHA for a34e743 - Browse repository at this point
Copy the full SHA a34e743View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c609c0 - Browse repository at this point
Copy the full SHA 0c609c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38b711c - Browse repository at this point
Copy the full SHA 38b711cView commit details