QupZilla / qupzilla

Cross-platform Qt web browser
http://www.qupzilla.com
GNU General Public License v3.0
1.12k stars 348 forks source link

Notification prompt loses focus #1337

Open AndyM48 opened 10 years ago

AndyM48 commented 10 years ago

When I make a search using StartPage, and click on a result, the page opens in the same tab.

Wish: Option to open links in new tab or window automatically.

When I then go back to the search page by clicking on the back button I receive this message in a notification window:

"To show this page, QupZilla must resend request which do it again (like searching on making an shopping, which has been already done.)"

Wish: Not good English - Suggest "To show this page, QupZilla must resend the previous request"

(Note: this does not happen using Google search page, in which case the previous search is loaded without any notification window.)

Bug: The notification window which opens does not have the focus, so it is necessary to click on the Yes button twice to get the refreshed search page back.

All the best

Andrew

AndyM48 commented 10 years ago

I changed the search string to:

https://startpage.com/do/search?q=%s

and most of the above is now working correctly, e.g. there is no notification window opened and the back button returns me to the search window correctly. The following still exist though:

Wish: Option to open links in new tab or window automatically. Wish: Not good English - Suggest "To show this page, QupZilla must resend the previous request" Bug: The notification window which opens does not have the focus, so it is necessary to click on the Yes button twice to get the refreshed search page back.

Andrew

nowrep commented 10 years ago

The To show this page, QupZilla must resend... dialog should have a focus (see https://github.com/QupZilla/qupzilla/blob/master/src/lib/webkit/webpage.cpp#L552 - the dialog have a WebView as a parent). It's up to your WM to set the focus to the dialog. If it does not do it, then the problem is in your WM (it works fine for me with KWin).

pejakm commented 10 years ago

Wish 1: That's normal behaviour, according to page source. Middle click will open it in new tab (as well as ctrl + click or right click + one of the menu options). Wish 2: Agreed. Bug: Works for me. What is your DE and WM?

AndyM48 commented 10 years ago

Wish 1: OK, but I would like the option to ALWAYS open a link in a new tab, automatically, which would need another check box under Edit>Preferences>Tabs or Edit>Preferences?Browsing Bug: LightDM + Compiz (under Arch Linux)

Increasingly it seems to me that it would be advantageous to have a Forum whee we could swap ideas and tips, and ask for help, instead of using the bugs list. What do you think?

Andrew

pejakm commented 10 years ago

Like I've said, the page (in this case startpage.com) is dictating whether the link opens in the same window/tab or it will open in new window (eg. using target="_blank"). It is ridiculous to even think of QupZilla forcing all links to open in new tab/window.

Could you try with compiz off? It is known to create problems with window focusing.

AndyM48 commented 10 years ago

It is ridiculous to .... Perhaps not a good choice of words when I was suggesting an option? Anyway "ctrl + click" combined with "Automatically switch to newly opened tab" does very nicely - thank you.

Now that I have the correct string for startpage, I do not see the notification window, so the problem no longer exists for me, unless you know how I can force the window to appear.

pejakm commented 10 years ago

Now that I have the correct string for startpage, I do not see the notification window, so the problem no longer exists for me, unless you know how I can force the window to appear.

Because you've changed your search line to use GET method. For StartPage using POST method you can use these:

URL: https://eu3.startpage.com/do/search POST: query=%s&cat=web&cmd=process_search&language=english&engine0=v1all&abp=1&suggestOn=1

_Note that &cat=web&cmd=process_search&language=english&engine0=v1all&abp=1&suggestOn=1 are my own preferences and probably not needed for a search to work correctly._

AndyM48 commented 10 years ago

OK, I will set up an alternative search string and see what happens.

Andrew

AndyM48 commented 10 years ago

"Could you try with compiz off? It is known to create problems with window focusing."

Nope, same thing, have to click "Yes" twice to action it

" It is ridiculous to even think of QupZilla forcing all links to open in new tab/window."

Actually this is the default behaviour in both my Firefox installations. Of course I cannot tell if it is some setting I have selected in the past or not. Edit: No it isn't, as pejakm said, it seems to depend on the coding of the page.

Cheers

Andrew

pejakm commented 10 years ago

Nope, same thing, have to click "Yes" twice to action it

Tried with another WM? As I recall, it works in openbox, but I haven't tried awesome yet.

Actually this is the default behaviour in both my Firefox installations. Of course I cannot tell if it is some setting I have selected in the past or not.

You mean, clicking any link on any web page opens the link in new tab?! There's no such option in Firefox or Chrome. You must have installed some extension or tweaked something in Firefox.

AndyM48 commented 10 years ago

It doesn't seem to work with Compiz or Kwin here.

default behaviour in ... Firefox

I was wrong, as I think you said before, it seems to depend on the source page.

Andrew

pejakm commented 10 years ago

@fdservices We agreed regarding your first problem, right? Your suggestion is taken into consideration in #1344. Your second problem is an issue left to be solved. I cannot reproduce it (KDE under Arch). Do you happen to run xcompmgr? Have you tried under openbox, for example?

And please, next time, if the problems you have are not much related, open new issue for each of them.

AndyM48 commented 10 years ago

Sure, would you like to close this issue now, I think we have exhausted it

Andrew

pejakm commented 10 years ago

Nope, we'll get to the bottom of this. You haven't responded to:

Do you happen to run xcompmgr? Have you tried under openbox, for example?

According to the Arch Wiki article awesome is known to cause issues with some apps. It might be the case with QupZilla.

nowrep commented 10 years ago

What exactly gets the focus when the dialog appears? It is modal dialog with parent being the BrowserWindow. I can't imagine what else could get the focus, if not the dialog. In any case, it sounds to me like an issue of your WM.

AndyM48 commented 10 years ago

OK - I am not using xcompmgr and I have not tried openbox or awesome.

I normally run kde + compiz on arch linux. At present I am running kde + kwin.

Here is the sequence of events at present:

This has the focus.

After the next mouse click the dialog menu receives the focus, hence the two clicks needed.

I cannot stop the drop down menu appearing, I am not "hovering" over the button, or double clicking.

Hope this helps

Andrew

nowrep commented 10 years ago

What exactly do you mean with a "drop down menu appears with the content Web search + Speed Dial + Clear History"? Maybe can you please make a screenshot?

AndyM48 commented 10 years ago

Please see attached

All the best

Andrew

/FD Services Ltd, 19 Canons Hill, Old Coulsdon, Surrey CR5 1HB. Reg No: 2017683 England

This email contains confidential information. If you are not the intended recipient you should destroy this email immediately. You may not copy or use the contents or attachments in any way./

On 28/05/14 23:07, David Rosca wrote:

What exactly do you mean with a "drop down menu appears with the content Web search + Speed Dial + Clear History"? Maybe can you please make a screenshot?

— Reply to this email directly or view it on GitHub https://github.com/QupZilla/qupzilla/issues/1337#issuecomment-44464616.

pejakm commented 10 years ago

@fdservices You must attach it directly here.

AndyM48 commented 10 years ago

OK - here you go:

screenshot

nowrep commented 10 years ago

So the issue only occurs when you navigate through history with back/forward menu? Or the opened menu have no impact on this issue?

AndyM48 commented 10 years ago

Not sure that I understand you.

If you set the startpage search engine to use the POST method as above and then:

Execute a search Select item - page loads in same tab as search results Hit back arrow - here the drop down menu appears with the content Speed Dial + Clear History (see screenshot above) and the 'Confirm form resubmission' window opens at the same time. The dialogue window does not have the focus at this point. After the next mouse click the dialog menu receives the focus, so two clicks are needed to reply Yes.

I cannot stop the drop down menu appearing, I am not "hovering" over the button, or double clicking.

Hope this helps

Andrew

nowrep commented 10 years ago

What about just reloading page to trigger the "Form resubmission" dialog?

AndyM48 commented 10 years ago

I think I have cracked it. If you enter the search page URL as http://www.startpage.com/do/search and the POST data as query=%s then it works as expected. If you enter the search page URL as https://startpage.com/do/search?q=%s then, again it works fine.

If you enter the URL as https://startpage.com/do/search and the POST data as query=%s then it behaves as I have posted, so the combination of the secure server address and the POST data seems to be the problem.

Andrew

AndyM48 commented 10 years ago

Did you manage to reproduce/fix this?

Andrew

nowrep commented 10 years ago

Unfortunately no, I did not.