Skip to content
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

Page jumps to the top each time a block is selected or added #21622

Closed
violetlynx opened this issue Apr 15, 2020 · 18 comments
Closed

Page jumps to the top each time a block is selected or added #21622

violetlynx opened this issue Apr 15, 2020 · 18 comments
Labels
[Status] Needs More Info Follow-up required in order to be actionable.

Comments

@violetlynx
Copy link

violetlynx commented Apr 15, 2020

Hi!
After I've added enough blocks (all of them are images with links to another pages) that they can't be displayed in one window and there is a need to scroll down to view blocks at the bottom of the page, every time I choose a block to edit or add another one the page jumps to the top.

I've tried deactivating basically all plugins but that haven't affected the issue.
Installing Gutenberg plugin solved the problem, but with the default editor it happens how I've described above.

Here is an example of the content (I show just two blocks, but the page contain several dozens of them and it should have a lot more when I am done):

A Dance of Ice and Fire A Dance of Ice and Fire
Blazing Autumn Blazing Autumn

To reproduce
Steps to reproduce the behavior:

  1. Go to a page with a lot of blocks like shown above.
  2. Scroll down to a block at the bottom of the page.
  3. Click on it
  4. See error

Also if I choose a block and than choose HTML-editor other images just stay on top of the code so this mode is completely unusable. Here is a screenshot of how is looks:

screenshot1

Editor version (please complete the following information):

  • WordPress version 5.4
  • Default Block editor

Desktop (please complete the following information):

  • Windows 10
  • Browser - Firefox ver. 72.0.2 and Chrome ver. 80.0.3987.163
@jasmussen
Copy link
Contributor

Hello, thank you for the report!

@youknowriad do you know if this ticket will be fixed by #21460?

@youknowriad
Copy link
Contributor

I think so, @violetlynx Can you confirm that the last Gutenberg plugin update fixes this for you?

@violetlynx
Copy link
Author

violetlynx commented Apr 16, 2020

Hi!

Yes, after I've installed the Gutenberg plugin there is no jumps to the top. Although there is one other problem with switching between html and visual (the page crashes) unless I use a roundabout way of doing it.

@jasmussen
Copy link
Contributor

Although there is one other problem with switching between html and visual (the page crashes) unless I use a roundabout way of doing it.

Can you clarify what you mean by "crashes"? Are you getting any error messages you can share here?

@violetlynx
Copy link
Author

violetlynx commented Apr 16, 2020

Here is what I get as a result:
error

The sequence that leads to this:

  1. I create new page, enter title.
  2. Create first block (insert foogallery)
  3. Create second block from "formatting\classic" menu.
  4. Switch this block into HTML-view and enter content.
  5. Try to switch back to Visual and the error happens.

What I have to do is after step 4 - publish the page, than reload and only after that I can work with this "classic" block in the visual editor.

@jasmussen
Copy link
Contributor

Thanks @violetlynx. Can you click the "Copy error" button, and paste the contents here? That will help debugging.

@violetlynx
Copy link
Author

To clarify, this doesn't happen when I use build-in editor, only when I use Gutenberg plugin.

@jasmussen
Copy link
Contributor

Thank for the added info. I was unable to glean what might have caused that particular crash, I even tried retracing your steps with the foogallery plugin, but was unable to reproduce.

Are you saying that you're using the custom HTML block and it's switching between the tabs that causes the crash?

Screenshot 2020-04-16 at 15 43 10

If that's the case then you might have entered some HTML that broke things. You don't have to share it in case it's sensitive, but if you could say it was an embed or what you were trying to accomplish, that might help.

@violetlynx
Copy link
Author

I am not using a block for custom HTML but a classic block into which I add content as html (because when I've tried to copy text unto it in visual mode it looses colors I've assigned):
error2

And here is the content I enter into this block:
error3
I've tried to enter my text as a code but browser keep changing it into visual.

@violetlynx
Copy link
Author

Crash happens when I try to swich back from html into visual.

@jasmussen
Copy link
Contributor

Thanks for your patience.

When you say this:

am not using a block for custom HTML but a classic block into which I add content as html

What exactly do you mean? Do you mean going into this code editor?

Screenshot 2020-04-16 at 16 12 44

Or do you mean this one?

Screenshot 2020-04-16 at 16 13 20

In both cases, I can't get it to crash, using the classic block.

I wanted to note that you can colorize text using the normal Paragraph block:

text color

Let me know if that helps.

@violetlynx
Copy link
Author

In my previous message the fist screen was to show you which particular block I've used (it is in "formatting" sub-menu and called "classic").
And the crash happens when I try to switch the view only for the particular block (so I use the option on top of the page from your second example).

As for colors, yeah, I know that, but I don't want to do color change for several lines in several hundreds of blocks, so I just copy a "template" where all colors and formatting is made as I want it and just change few words, because for some reason when I copy text from one page into another in visual mode it looses all colors.

@violetlynx
Copy link
Author

One more addition. It looks like it doesn't matter at all what I enter into the block, because even if I entered just a simple string of letters when I try to change from HTML mode into visual mode the page crashes.

@jasmussen
Copy link
Contributor

I'm very much unsure what might cause this crash for you, I simply can't reproduce. Is your WordPress version up to date? Are all your plugins up to date? You could try a different browser, you could try disabling plugins one by one to try and figure out what might be causing it. It could even be a browser extension.

Regarding this:

As for colors, yeah, I know that, but I don't want to do color change for several lines in several hundreds of blocks, so I just copy a "template" where all colors and formatting is made as I want it and just change few words, because for some reason when I copy text from one page into another in visual mode it looses all colors.

I'll create a new ticket to note that copy pasting from one paragraph to another should not strip out colors. That's definitely a bug.

In the mean time, and in absense of us figuring out what crashes the editor, you can do this:

reusable

That is, you create your layout as you want it, colors and everything. Then you save those blocks as reusable. Now whenever you need those colors again, you can insert the reusable block you saved, convert it to a regular block, and edit it.

Hope that helps.

@jasmussen jasmussen added the [Status] Needs More Info Follow-up required in order to be actionable. label Apr 17, 2020
@jasmussen
Copy link
Contributor

I created #21670 for copy pasting text color.

@violetlynx
Copy link
Author

Thank you for your help! I understand it is difficult to find a bug when you can't check my end of things. I'll try to use reusable blocks and see if that will solv my immediate problem. Although the first thing - the jumping to the top in build-in editor - is more important (basically that is the only thing that prevents me from using it as I had no other problems their except loosing colors when copy things, but that is, as I understand, a bug that affect editor in general).

@jasmussen
Copy link
Contributor

Thank you. Because the initial ticket, jumping, was fixed by updating the plugin, I'm going to close this one as addressed. If the crash keeps happening in next versions of the plugin or WordPress, or you find other steps to reproduce, come back and comment or open a new ticket and we'll look again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs More Info Follow-up required in order to be actionable.
Projects
None yet
Development

No branches or pull requests

3 participants