Project

General

Profile

Bug #1416

Click events don't always get properly processed

Added by Kurt Roeckx about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/02/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I sometimes run into weird problems with my site, and when trying to reproduce it usually works properly. I can at least reproduce some of the effects with the http://www.webtoolkit.eu/wt page. I think they might all be effects of the same underlying problem. It all comes down to not properly handling click events.

The effects that I see are:

- The URL in the browser doesn't match the URL I'm looking at. That is, the URL for the link I clicked is displayed in the browser while the page still shows the content of the old URL. Usually clicking the URL I want to go to again fixes it, sometimes it doesn't.

  • While I normally don't see a "?wtd=" in the URL in the browser, I sometimes do see it.

I think the problem is that the whole page isn't properly rendered yet, or that it's still bootstrapping or something.

As far as I know with the progressive bootstrap mode the URLs first get written with the "?wtd=" part in the html and then ajax rewrites the URLs without them. I think I click the link before ajax was able to rewrite the URLs, so I end up going to a link with it.

I think the first issue is similar and that there is confusion about what the browser has in the DOM and what Wt thinks is in it, and Wt then tries to do find objects that don't exist, or thinks it already changed something but didn't.

The easiest way to reproduce this is loading the page and clicking a link as fast as possible. It also helps if the page is slow to load, because of images, being on a slow link, or something similar.

Kurt

Also available in: Atom PDF