-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] Search input in "Filter" tab in advanced search drops key presses as of 5.3.5 on Firefox #8551
Comments
@hoelzro I am curious if browser addons might be playing a role here, have you tested with all addons disabled? |
@saqimtiaz That's a good point! I have - I launched a fresh Firefox profile (just using the WebExtension |
Ok, I've managed to spend some time on this this week! Testing Setup
Actual Findings
Removing either of these makes the issue go away - what's interesting here is that if you replace Theories/Next Steps
Any suggestions/insights/guidance around this investigation would be very much appreciated 🙂 |
FWIW, Windows 10, Firefox 129.0.2... tw-com, 5.3.5, location: AdvancedSearch filter tab, no issue. https://hoelz.ro/files/gh-8551-repro.html location: AdvancedSearch filter tab, no issue. Not sure what you're doing with the delay widget. I removed it and found no issue (the above tests worked). |
@CodaCodr Thanks for taking it for a spin! When you say "completely unusable" - did any keypresses show up? |
I've managed to reproduce this behavior entirely outside of TiddlyWiki: https://jsfiddle.net/5z1ft7ky/ That part leads me to think that this might be a deeper issue with Firefox itself and how it processes events while manipulating the DOM. If that's the case, it's not really TiddlyWiki's responsibility to fix this behavior, but I'm wondering if TiddlyWiki's rendering/DOM manipulation could be changed to work around this issue. I did a simple reproduction using React and noticed that did not run into this issue (so it seems that a fixed version is possible!), but its virtual DOM implementation is obviously significantly different from TiddlyWiki's DOM manipulation code, so that would probably be a lot of work in a pretty core part of TiddlyWiki. One thing that I did notice that's interesting - when I tried making my standalone reproduction above, I originally laid out the DOM elements using plain HTML, but Firefox actually rearranged the elements. It moved the innermost
Considering that my testing has shown different results based on the "block-y-ness" of different elements involved, I'm wondering if Firefox allows certain types of illegal DOM nesting, but has bugs around them. |
Hi @hoelzro thanks for investigating this. Perhaps this is a good prompt to try to systematically fix all the illegal HTML nesting that occurs in the core. We could extend the test suite to generate some static content builds and run them through an HTML validator. |
Things like |
'twould be a noble effort, certainly. But considering I have ~50 wikis (my wife has many more) and all I ever use is Firefox (seems like forever), I have never witnessed behaviour like this, locally. And when you add to that, the ease with which the touted cause is likely to appear... I can't imagine how it might be prevented AND keep "nice" code layout. If this were reported at Bugzilla, I would understand totally if the moz devs responded WONTFIX. |
I think that's not true. With the jsfiddle example imo there is a good chance that they will have a closer look at it. |
Hi @CodaCodr the motivation for such a change wouldn't just be this Firefox bug. The more basic problem is that the browser behaviour for misnested HTML elements is largely undefined, giving us a vulnerability to future problems. But the primary goal would be to improve interoperability with other HTML tools. For example, if we want to be able to plug TiddlyWiki's HTML output into tools like Pandoc a good starting point is for us to be producing valid HTML. |
@Jermolene -- I did create 2 PRs, that directly tackle the problem described here.
#8577 should be merged first |
@Jermolene Like I said, noble effort. @pmario I think you missed "if". Neither of us has a crystal ball. My concern is the ease with which |
There is a draft PR: WIP Improve redundant p tags #7061 where I think I have identified the problem. When the PR was opened and it would have been merged, the TW UI would have had at least 50 severe formatting problems. I did a new test yesterday, with the current master branch. We are down to 3 or 4 problems. Mainly with the editor toolbar buttons. So I think we are on a good way to finally eliminate redundant html P-tags from the UI. |
Hi everyone, I've been digging into this on and off for the past few weeks, and I've made some interesting discoveries!
|
Thanks @hoelzro that is interesting. The |
Sorry, I think I misspoke - from my understanding,
If Is my understanding correct here? |
@hoelzro -- I think what you describe is what I've done with the "temporary" fix at: https://github.com/TiddlyWiki/TiddlyWiki5/pull/8577/files Removing the DIV child from the set-widget and moving it "outside" the set into the "reveal-widget". It seems to work, but as I wrote -- I do not really know why. So thanks for your digging. I think with the jsfiddle from your comment #8551 (comment) you will be able to describe the bug in a way that FF developers actually listen. So you should create an issue at bugzilla where you link to jsfiddle. |
@pmario Yes, thanks for doing that! And I think you're right regarding submitting my jsfiddle - I need to get around to that 😅 I'm kind of wondering if we address this bug at the widget refresh/DOM manipulation level - for example, can we get widgets like |
Describe the bug
Note: I currently have only reproduced this on my own wiki, but I thought it would be wise to report it so that others can find it and I can share details/take in suggestions as I try to get to the bottom of this.
After upgrading from TiddlyWiki 5.3.3 to 5.3.5, I noticed that if I use "search by filter" in the advanced search tiddler, typing at my normal speed ignores one of every couple key presses.
I don't see this on Chrome, and I do see this on a fresh Firefox profile.
Expected behavior
No response
To Reproduce
(working on a minimal reproduction)
Screenshots
No response
TiddlyWiki Configuration
Version: 5.3.5
Saving mechanism: Node
Browser: Firefox 129.0.1
OS: Arch Linux
Plugins: Quite a few - more details in the "Additional context" section
Additional context
I used
git bisect
to identify the commit that introduced the bug (e571239), and then experimented to find the specific change within that commit - if I restore that deleted newline, search-by-filter works fine again, which is confusing, to say the least.I started up an instance of my wiki with my extra plugins disabled; I managed to figure out that the calendar plugin I am using contributes to the bug. On my wiki, the CSS provided by that plugin seriously impairs the performance of
styleRefresh
- I actually have an overridden tiddler that "unrolls" that CSS, but even then its presence still significantly increases thestyleRefresh
timing. The bug shows up whether or not I have the calendar and my override of its CSS tiddler in my wiki, but more keys end up getting dropped when they are present.The surface-level "fix" of reverting that newline removal works - another "fix" would be to remove the calendar plugin and my overridden CSS for it. But it feels off to me that a slow style refresh causes keyboard inputs to get dropped, rather than just be laggy, so I'm going to try to get to the bottom of this. My wiki isn't exactly small - it's nearing 13K tiddlers in size - and there's plenty of additional customization lurking beneath the surface that I'm sure may contribute to the problem. I'm going to try to create a more minimal reproduction, and will post it here if I manage to do so.
In the meantime, any help or guidance to help me on my quest to figure out what might be going on would be appreciated! Here are some open questions I currently have:
styleRefresh
doesn't throttle likemainRefresh
does - should it?The text was updated successfully, but these errors were encountered: