Giter Site home page Giter Site logo

Notes keep scrolling up about notes HOT 14 CLOSED

RTechSn avatar RTechSn commented on May 28, 2024 5
Notes keep scrolling up

from notes.

Comments (14)

beardhatcode avatar beardhatcode commented on May 28, 2024 2

I can reproduce this on

  • Firefox on linux
  • Chrome om mac

The issue is caused by the following piece of code (webpack:///text/src/components/Editor.vue#655)

		onBlur() {
			this.emit('blur')

			// Hand back focus to the previous trap
			window._nc_focus_trap?.[0]?.unpause()
			this.$el.focus()   //  <---  This line caused the editor to shift
		},

In this context, this.$el is the #editor-container element

Stack trace to this point (which occurs on the blur event)
onBlur (webpack:///text/src/components/Editor.vue#655)
emit (webpack:///text/node_modules/@tiptap/core/dist/index.js#155)
emit (webpack:///text/node_modules/@tiptap/core/dist/index.js#155)
dispatchTransaction (webpack:///text/node_modules/@tiptap/core/dist/index.js#3674)
dispatch (webpack:///text/node_modules/prosemirror-view/dist/index.js#5327)
blur (webpack:///text/node_modules/@tiptap/core/dist/index.js#3166)
runCustomHandler (webpack:///text/node_modules/prosemirror-view/dist/index.js#2862)
someProp (webpack:///text/node_modules/prosemirror-view/dist/index.js#5135)
runCustomHandler (webpack:///text/node_modules/prosemirror-view/dist/index.js#2860)
initInput (webpack:///text/node_modules/prosemirror-view/dist/index.js#2829)
initInput (webpack:///text/node_modules/prosemirror-view/dist/index.js#2828)
constructor (webpack:///text/node_modules/prosemirror-view/dist/index.js#4942)
createView (webpack:///text/node_modules/@tiptap/core/dist/index.js#3589)
constructor (webpack:///text/node_modules/@tiptap/core/dist/index.js#3438)
dt (webpack:///text/src/EditorFactory.js#72)
onLoaded (webpack:///text/src/components/Editor.vue#505)
onLoaded (webpack:///text/src/components/Editor.vue#502)
emit (webpack:///text/node_modules/mitt/dist/mitt.mjs#1)
emit (webpack:///text/node_modules/mitt/dist/mitt.mjs#1)
emit (webpack:///text/src/services/SyncService.js#317)
open (webpack:///text/src/services/SyncService.js#119)
 (webpack:///text/src/services/WebSocketPolyfill.js#72)
S (webpack:///text/node_modules/y-websocket/src/y-websocket.js#131)
connect (webpack:///text/node_modules/y-websocket/src/y-websocket.js#484)
j (webpack:///text/node_modules/y-websocket/src/y-websocket.js#378)
S (webpack:///text/src/services/SyncServiceProvider.js#44)
initSession (webpack:///text/src/components/Editor.vue#384)
mounted (webpack:///text/src/components/Editor.vue#319)
invokeWithErrorHandling (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#3033)
callHook$1 (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#4048)
insert (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#4443)
invokeInsertHook (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#6966)
patch (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#7180)
_update (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#3781)
updateComponent (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#3891)
get (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#3462)
Watcher (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#3452)
mountComponent (webpack:///text/node_modules/vue/dist/vue.runtime.esm.js#3908)

from notes.

poiNt3D avatar poiNt3D commented on May 28, 2024 1

This may be related to the problem with Files web-app, the page is scrolling to the top after bringing up the right-click menu.

from notes.

bufferlow avatar bufferlow commented on May 28, 2024 1

Seems solved in 28.0.4 - work for me.

from notes.

MrRinkana avatar MrRinkana commented on May 28, 2024 1

Can those who could reproduce this issue check if thats still the case after uppgrade to >28.0.3 and if not like @bufferlow's commment. If noone can reproduce it anymore maybe @RTechSn can close the issue?

Based on @beardhatcode's findings, this issue was fixed in nextcloud/text@2c9e7a0 in nextcloud/text#5281 which was backported to 28.0.3

from notes.

bonswouar avatar bonswouar commented on May 28, 2024

I can confirm the issue is also present on Chrome 121.0.6167.140
And it also happens if you save the note manually (clicking on the check-mark)

This makes the notes webapp on desktop almost totally unusable, any workaround?
Meanwhile I might give a chance to qownnotes (I wish there was an official native desktop app though!)
EDIT : QOwnNotes works pretty flawlessly, if you don't mind the UI I'd recommend using it instead of the webapp

from notes.

MrRinkana avatar MrRinkana commented on May 28, 2024

For me this happens even when clicking any of the menu options in the top row, like header, warning, save etc. Some examples of behaviour:

  • Text styling options: the view jumps/flickers up then back down, but not to the exact same location
  • Adding link: first jumps up, and then back down when you finish adding the link (click the arrow)
  • Adding or removing headers, sections (warn, info etc.) just jumps up
  • Saving just jumps up

The "scroll" is more of a jump (it is instant)
I am using the rich-text editor.

It only happens while in the notes app (what I found); if I open the same file in the same rich-text editor from Files it does not scroll up. The difference seems to be that in the files app rich-text opens in "full screen" with the cross to close.

This makes editing notes in the notes app very disorienting, and working on longer files more or less impossible.

I'm on nc 28.0.2 and notes 4.9.2

from notes.

bufferlow avatar bufferlow commented on May 28, 2024

I have the same issue - killing my workflow :-(

Notes app version: 4.9.2
Nextcloud version: Nextcloud Hub 7 (28.0.2)

Maybe I found a workaround: Opening notes via file browser provides almost the same editor view and same functions the notes app does. But it work without the scroll-jump issue.

from notes.

arnowelzel avatar arnowelzel commented on May 28, 2024

For me this happens even when clicking any of the menu options in the top row, like header, warning, save etc. Some examples of behaviour:

  • Text styling options: the view jumps/flickers up then back down, but not to the exact same location
  • Adding link: first jumps up, and then back down when you finish adding the link (click the arrow)
  • Adding or removing headers, sections (warn, info etc.) just jumps up
  • Saving just jumps up

The "scroll" is more of a jump (it is instant) I am using the rich-text editor.

It only happens while in the notes app (what I found); if I open the same file in the same rich-text editor from Files it does not scroll up. The difference seems to be that in the files app rich-text opens in "full screen" with the cross to close.

This makes editing notes in the notes app very disorienting, and working on longer files more or less impossible.

I'm on nc 28.0.2 and notes 4.9.2

I can confirm this behaviour. However, this does not happen in Collectives or the text editor - so it seems to be a specific issue with Notes and not the editor component.

from notes.

McLibboc avatar McLibboc commented on May 28, 2024

Same issue here when using the rich text editor for notes.

from notes.

Finn10111 avatar Finn10111 commented on May 28, 2024

I have the same issue - killing my workflow :-(

Notes app version: 4.9.2 Nextcloud version: Nextcloud Hub 7 (28.0.2)

Maybe I found a workaround: Opening notes via file browser provides almost the same editor view and same functions the notes app does. But it work without the scroll-jump issue.

Thank you for sharing your workaround - works for me!

from notes.

RTechSn avatar RTechSn commented on May 28, 2024

@beardhatcode I apologize for bothering, but it seems that "need to reproduce" tag got added back.

from notes.

Finn10111 avatar Finn10111 commented on May 28, 2024

Can those who could reproduce this issue check if thats still the case after uppgrade to >28.0.3 and if not like @bufferlow's commment. If noone can reproduce it anymore maybe @RTechSn can close the issue?

Based on @beardhatcode's findings, this issue was fixed in nextcloud/text@2c9e7a0 in nextcloud/text#5281 which was backported to 28.0.3

Just upgraded to 28.0.4 and also the notes app and the issue is gone! The cursor stays at the the position where it was after switching tabs! Great, seems to be solved 👍

from notes.

arnowelzel avatar arnowelzel commented on May 28, 2024

Can those who could reproduce this issue check if thats still the case after uppgrade to >28.0.3 and if not like @bufferlow's commment. If noone can reproduce it anymore maybe @RTechSn can close the issue?

Based on @beardhatcode's findings, this issue was fixed in nextcloud/text@2c9e7a0 in nextcloud/text#5281 which was backported to 28.0.3

I can confirm too, that it works now with NC 28.0.4. Great work, thanks for the fix!

from notes.

RTechSn avatar RTechSn commented on May 28, 2024

I can confirm too that on version 28.0.4 the issue is no longer present.

from notes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.