Skip to content
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

Google Chrome reloads dashboard twice #1561

Closed
mattab opened this issue Aug 6, 2010 · 12 comments
Closed

Google Chrome reloads dashboard twice #1561

mattab opened this issue Aug 6, 2010 · 12 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Aug 6, 2010

When I go to http://demo.piwik.org using Google Chrome on windows XP, the dashboard first partly loads, then the dashboard visibly reloads itself. This is def not expected.

@robocoder
Copy link
Contributor

In IE8 on Vista, I was getting a lot of console errors, "Object doesn't support this property or method". Disabling the PDFReports plugin seemed to fix this.

@peterbo
Copy link
Contributor

peterbo commented Aug 7, 2010

This behaviour is somehow caused by the visitor country map plugin. Disabling it, fixes the problem.

@mattab
Copy link
Member Author

mattab commented Aug 16, 2010

I can confirm that issue is caused with the Maps widget.

Peter, good stuff. I'm curious, how did you find out the cause?

@peterbo
Copy link
Contributor

peterbo commented Aug 16, 2010

This was not a big deal. I was able to reproduce the bug with the current trunk but not with the current install on a webserver. The only difference between these two installs was the World-Map plugin.

The problem could be further tracked down to line 21 in worldmap.tpl
Since it is a chrome-specific issue it could either be a bug in chrome js engine or an error with a conditional comment for chrome

$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());

deleting it seems to fix the issue (please confirm).

Further info to the browser detection of jquery: http://api.jquery.com/jQuery.browser/

Update:
JQuery.browser - object seems to be deprecated as of version 1.3.
http://xhtml.co.il/en/page-1013/jQuery.browser

Now the JQuery.support-object should be used instead to determine if the browser supports w3c boxModel etc.:
http://xhtml.co.il/en/page-1012/jQuery.support

@peterbo
Copy link
Contributor

peterbo commented Aug 16, 2010

Attachment: Replaces the $.browser.chrome browser-detection hack with a short workaround. Please check, because I'm no JS hero! I tested in Chrome / IE8 / FF3 / Safari and the x-offset of the control-icons seemed ok.
#1561-20100816-v1.diff

@gka
Copy link
Contributor

gka commented Aug 16, 2010

I had to introduce this line because the default jQuery browser detection makes no difference between Safari and Chrome but both browsers have different ways of calculating the width of a html select element. I don't think that this issue is connected to the box-model bug.

There are serveral work-arounds for this:

  • we find a way to detect Safari that doesn't force Chrome to reload the page
  • we define a fixed width for the html select
  • we hard-code the select widths for every translated language
  • we just don't care about the users of buggy Safari
  • we throw away the fullscreen feature from the icon bar (it would only be accessible via context menu)
  • we break the UI consistency by aligning the icons to the right

@gka
Copy link
Contributor

gka commented Aug 16, 2010

The fix looks good, I'll commit this. Thanks a lot :)

@gka
Copy link
Contributor

gka commented Aug 16, 2010

(In [2950]) added bug-fix from peterB (fixes #1561)

@peterbo
Copy link
Contributor

peterbo commented Aug 16, 2010

Greg, I think there is also a Variable to be changed on line 71.

@gka
Copy link
Contributor

gka commented Aug 16, 2010

Oh yes, I forgot to fix this because this is a very unnecessary line. The select elements width doesn't change as the browser window width changes. I'll remove it..

@peterbo
Copy link
Contributor

peterbo commented Aug 17, 2010

"{" and "}" are no valid strings to capsule js comments, please fix as it is in .diff file.

Can be checked here:
[http://www.w3schools.com/JS/tryit.asp?filename=tryjs_comments2]

Update:
Sorry, my fault - it's a Smarty Comment and therefore it's ok!

@gka
Copy link
Contributor

gka commented Aug 17, 2010

I think these are Smarty comments which doesn't appear in the html output.

@mattab mattab added this to the Piwik 0.9.9 - Stable release milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

4 participants