djipco / webmidi

Tame the Web MIDI API. Send and receive MIDI messages with ease. Control instruments with user-friendly functions (playNote, sendPitchBend, etc.). React to MIDI input with simple event listeners (noteon, pitchbend, controlchange, etc.).
Apache License 2.0
1.53k stars 115 forks source link

Website navigation issue #236

Closed recri closed 2 years ago

recri commented 2 years ago

Description The website is pinning the browser to the first section of each page, it fights scrolling off that section with scrollbar or scrollwheel, the first nav item on the right remains selected even when you select a later item.

Environment: Chrome stable recently updated on latest released Ubuntu Linux also regularly updated.

Details I go to "https://webmidijs.org/docs/", the page loads with Step 1 selected in the right nav menu. I can scroll the page Title offscreen and no further. I can appear to select Step 2 or one of the other right nav menu items, but the selection is immediately reverted to Step 1. I can, with concentrated effort drag the scroll bar down the page, but I can't read anything as the manual position fighting with the automated position flickers the page position up and down. Same thing happens on all the pages I've visited with right nav menues.

djipco commented 2 years ago

Dear Roger,

Thanks for reporting this. Unfortunately, I do not currently have a Linux box to test this. However, I did check it on both macOS and Windows and the problem you describe does not occur.

The website is built using Docusaurus. Would it be possible for you to check other websites created with Docusaurus to see if the problem occurs with them also?

They have a showcase. For instance, these sites seem to also use the right navigation menu:

recri commented 2 years ago

Fascinating.

The first, second, and fourth scroll correctly and the right nav menu tracks the section displayed.

The third shows the same problem as webmidijs.

I also tried webmidijs with opera and firefox on my Linux laptop, they both work. It also works on AndroidChrome, and on the old install on a Samsung Chromebook, and I'll test the updated 91.0.4472.167 build in a moment. It works there, too.

Well, at least I have several workarounds, so I can get back to reading your docs.

Best of luck sorting this out. Let me know if you rebuild and want a test.

-- rec --

djipco commented 2 years ago

Hmm...

By looking at the source code I can see that both the WEBMIDI.js site and the DocSearch site use v2.0.0-beta.15 of Docusaurus. Perhaps there is a problem with that version? I'm going to file a ticket with them.

djipco commented 2 years ago

An issue has been filed with the Docusaurus team. I will wait for their feedback...

djipco commented 2 years ago

The Docusaurus team replied. Can you check if the problem is related to the "Experimental web platform features" option being turned on?

recri commented 2 years ago

Ah, sorry, didn't mean to ghost you, just lost sync with my inbox.

Yes, disabling "experimental web platform features" in linux chrome stable on ubuntu fixed the problem on the webmidijs.org website.

Thank you for the solution.

Yesterday I discovered that a Teensy 4.0 can send enough NRPNs/second to crash chrome and lock up the Linux input system. Had to force power down the laptop several times before I tracked down the culprit. This wasn't webmidijs but my own PWA under development.

Here I am reading more than 256k 3 byte midi messages/second from the Alsa raw interface: Fri Mar 04 22:10:02 EST 2022 786432 bytes read Fri Mar 04 22:10:03 EST 2022 786432 bytes read Fri Mar 04 22:10:03 EST 2022 786432 bytes read Fri Mar 04 22:10:04 EST 2022 786432 bytes read Fri Mar 04 22:10:05 EST 2022 786432 bytes read Fri Mar 04 22:10:05 EST 2022 786432 bytes read Fri Mar 04 22:10:06 EST 2022 786432 bytes read Fri Mar 04 22:10:07 EST 2022 786432 bytes read Fri Mar 04 22:10:07 EST 2022 786432 bytes read Fri Mar 04 22:10:08 EST 2022 786432 bytes read Fri Mar 04 22:10:09 EST 2022 786432 bytes read That can happen if you define a midi message sent counter in your NRPNs, and then send it whenever the count changes.

Cheers,

-- rec --

On Sun, Feb 13, 2022 at 9:41 PM Jean-Philippe Côté @.***> wrote:

The Docusaurus team replied https://github.com/facebook/docusaurus/issues/6669#issuecomment-1038545360. Can you check if the problem is related to the "Experimental web platform features" option being turned on?

— Reply to this email directly, view it on GitHub https://github.com/djipco/webmidi/issues/236#issuecomment-1038567322, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVNDOJBL553TH6GGYJ2FDU3BTWNANCNFSM5N3EME4A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

djipco commented 2 years ago

Excellent. I will close the issue then.

Regarding the NRPN issue, I would encourage you to notify the Chrome team by posting a bug report on this page: https://bugs.chromium.org/p/chromium/issues/list