Development

#1673 ([PATCH] Debug Toolbar Renders Incorrectly in Safari)

You must first sign up to be able to contribute.

Ticket #1673 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

[PATCH] Debug Toolbar Renders Incorrectly in Safari

Reported by: Karl.Timmermann Assigned to: fabien
Priority: minor Milestone: 1.0.14
Component: other Version: 1.0.1
Keywords: safari, mac os x, toolbar Cc:
Qualification: Unreviewed

Description

When using the dev environment, the debug toolbar renders incorrectly in Safari (at least in v2.0.4). The red 'X' close image is on a second row, and not and the end of the first row like it should be. I am using symfony 1.0.1.

Attachments

safari.png (12.6 kB) - added by Karl.Timmermann on 04/15/07 20:56:20.
Screenshot of the Safari rendering
patch.css (87 bytes) - added by Halil.Koklu on 06/25/07 01:53:21.
simply after #sfWebDebugBar .menu li rule

Change History

04/15/07 20:56:20 changed by Karl.Timmermann

  • attachment safari.png added.

Screenshot of the Safari rendering

04/18/07 19:02:21 changed by fabien

  • milestone set to 1.0.3.

(in reply to: ↑ description ) 04/28/07 20:45:57 changed by Karl.Timmermann

3 Solutions that I found:

1.) In [php data directory]/symfony/web/sf/sf_web_debug/css/main.css, modify identifier "#sfWebDebugBar .menu li" so the padding looks like this:

padding: 0px;

Cons: formatting isn't as intended once change is made

2.) In [php directory]/symfony/debug/sfWebDebug.class.php, change line 330 from:

<li><a href="#" onclick="sfWebDebugShowDetailsFor(\'sfWebDebugConfig\'); return false;">'.image_tag(sfConfig::get('sf_web_debug_web_dir').'/images/config.png').' vars &amp; config</a></li>

to:

<li>'.image_tag(sfConfig::get('sf_web_debug_web_dir').'/images/config.png').' vars &amp; config</li>

Cons: this will remove the a href link of Vars & Config, which means it's not really a solution. Just interesting that doing this fixes the problem.

3.) Fix this image: [php data directory]/symfony/web/sf/sf_web_debug/images/config.png

Removing it or making is smaller also fixes the problem. Not sure why.

06/09/07 10:18:27 changed by fabien

  • milestone changed from 1.0.3 to 1.0.4.

06/20/07 13:27:15 changed by fabien

  • milestone deleted.

Unfortunately, none of these solutions can be implemented. I spent more than 1 hour trying to fix it with no luck.

So, if someone find a solution...

06/25/07 01:06:49 changed by Halil.Koklu

The alone solution I've found is

#sfWebDebugBar .menu li
{
  display: inline-block;
  ...
}

and at the end of the file

#sfWebDebugBar .menu li { display: inline;# }

This will hide this rule from Safari. But this will cause Safari to break up there. So put it at the end of file.

Tested on this browser: Internet Explorer (6+7), Firefox, Safari, Flock, Opera, Camino Test failed: Shiira. I think, this is a livable casualty.

06/25/07 01:17:00 changed by Halil.Koklu

  • summary changed from Debug Toolbar Renders Incorrectly in Safari to [PATH] Debug Toolbar Renders Incorrectly in Safari.

06/25/07 01:17:39 changed by Halil.Koklu

  • summary changed from [PATH] Debug Toolbar Renders Incorrectly in Safari to [PATCH] Debug Toolbar Renders Incorrectly in Safari.

06/25/07 01:52:47 changed by Halil.Koklu

I'm sorry. I've done a fault, testing this patch. I think the hack goes only for Safari 2 (i have safari 3 here, the uninstall process is too bad, to test with Safari2).

But I think, I've found a better solution.

Tested against: Safari 3 (Please test Safari 2 for me), Firefox, IE (6+7), Flock, Camino, Opera, Shiira

06/25/07 01:53:21 changed by Halil.Koklu

  • attachment patch.css added.

simply after #sfWebDebugBar .menu li rule

06/30/07 03:04:18 changed by Karl.Timmermann

  • milestone set to 1.0.6.

Thanks - that fixed it!

06/30/07 06:15:04 changed by Karl.Timmermann

I just tested in IE 7, and it did not look right at all. Did I mess something up?

06/30/07 11:47:20 changed by Halil.Koklu

  • milestone deleted.

It seems that Safari 2 and IE7 have minor pixel errors. but they are better than the word wrap. Anyone another idea?

Milestone will be set by core developers.

06/30/07 20:55:55 changed by Karl.Timmermann

Well, you could change these styles:

#sfWebDebugBar img {

vertical-align: middle;

}

#sfWebDebugBar .menu {

padding: 5px; display: inline;

}

#sfWebDebugBar .menu li {

display: inline; list-style: none; margin: 0; padding: 0 5px; border-right: 1px solid #aaa;

}

To this instead:

#sfWebDebugBar img {

float: left;

}

#sfWebDebugBar .menu {

padding: 5px; float: left;

}

#sfWebDebugBar .menu li {

float: left; list-style: none; margin: 0; padding: 0 5px; border-right: 1px solid #aaa;

}

And then just add some more styling to get rid of the padding around the unordered list. However, I'm not sure how to do this, since I don't know really know CSS.

10/01/07 07:50:20 changed by dwhittle

  • qualification set to Unreviewed.

Can some provide a patch and verify against ie/firefox/safari/opera?

04/14/08 16:16:15 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [8444]) fixed web debug toolbar in safari (closes #3328, #1673)

04/14/08 16:16:43 changed by fabien

  • milestone set to 1.0.14.

04/14/08 16:18:15 changed by fabien

(In [8445]) fixed web debug toolbar in safari (closes #3328, #1673 - patch from amadeus)

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.