Да, я вот в воскресенье баг нашёл, откуда ноги растут, Дориану написал, конкретно в коде указал, что не так, но он пока не ответил мне. Я сам не знаю пока, как грамотно фикс написать, т.к. нужно проанализировать весь код K-Meleon'а, как он работает, на это пару недель уйдёт. Вот, что я писал:
From: Oleg
To: Dorian
Date: 01/11/2016 04:34AM
Hello, Dorian. I have been using KM for half a year now, and I have noticed a rare but annoying bug - sometimes when I right click on some link and then click "Open In New Tab", the click is not registered somehow, the context menu disappears, and I have to do this all over again. It opens successfully on the second time. The websites that are affected by this are Youtube and Discogs.com.
You can reproduce this bug by starting the browser, going to some Youtube video (this one, for example:
https://www.youtube.com/watch?v=qir0XojwDcU), and then right clicking the uploader profile button (TubeTechHelp), and clicking "Open In New Tab". The tab won't open on the first time, but when you do this the second time, it will open with no problems.
I have looked through the KM code, and it looks like I have found the source of the bug. When new tab is not opened, GetLinkTitleAndHref(m_contextNode, url, title) function in CBrowserTab:surprised smileynOpenLinkInNewTab() returns FALSE, and because of that OpenURLInNewTab(url, m_pWindow->GetDocURL(m_contextNode), FALSE) isn't called. The function fails because of NS_ENSURE_TRUE(node, FALSE) check in MozUtils.cpp, line 259 (because node == 0). I also figured out that when I comment out the line "mpBrowserView->m_contextNode = nullptr;" (BrowserGlue.cpp, line 73), the problem disappears.
Obviously, to comment out some unknown line (to me) is not a good fix, so I'm gonna look some more into the code to find some better way to fix this, but I'm not very familiar with how KM works right now. Maybe it's just a simple problem, could you take a look at it too?