restlessminded / dokuwiki-plugin-svgEmbed

A dokuwiki plugin that allows the use of the standard media syntax, but SVG files are placed with the <embed> tag, not the <img> tag.
GNU General Public License v2.0
1 stars 2 forks source link

Section edit flickers #2

Closed Juergen-aus-Zuendorf closed 4 years ago

Juergen-aus-Zuendorf commented 4 years ago

Hi,

the section edit function gets a bit confused when this section contains an SVG image.

Best regards Juergen

restlessminded commented 4 years ago

Yes, I see that it "flickers" in some cases. In a couple cases, too, it doesn't do it in Chrome but it will in Firefox for the same page.

Let me look into that. I've seen similar behavior before from other plugins and certain stylesheet markups but never bothered to try to fix them because I had more pressing issues to handle so I am flying a bit blind on this one.

restlessminded commented 4 years ago

Okay, I found the issue.

The upshot is, when you hover the button it calls out to the server to get HTML set up for section highlighting. This works as expected, but since the embed isn't rendered yet the section collapses to the smaller size. So then, you're not doing a mouseover on the button, so it goes back to the original size, and then you're hovering, so it goes to the smaller size, etc. Thus, flicker.

I am going to wrap it in a div set with the size needed. That way, it doesn't collapse and everything works as expected from a user standpoint.

I'll try to make the changes over the next day or two.

restlessminded commented 4 years ago

I believe I just fixed this one. Please update and verify. I'm still curious what browser you were using.

I still need to update the documentation; I made quite a few changes in this one (basically, in fixing it also allowed me to make some things "features" in a way). It should still work by default, though.

restlessminded commented 4 years ago

Finished documentation earlier this evening.

Juergen-aus-Zuendorf commented 4 years ago

Excellent, now everything works perfectly

(Your question: I'm using Firefox)

restlessminded commented 4 years ago

Excellent! Thanks for the follow-up!

For the record, I actually wrapped it in a span instead, but either way I'm glad it's fixed.