Member
Member
ballsmag   2005-09-21, 20:38
#1

I've gotten AJAX to work in Safari by hacking ajax.js. Specifically, replacing this section:

`

this.style_width = getStyle(div, "width");

this.style_height = getStyle(div, "height");

`

with this code:

`

if (this.style_height == '0px') {

this.style_width = '400px';

this.style_height = '26px';

}

`

It's a cheap hack, for sure. And it has display issues, in that saving an album title will move the new title down to the next line. I'm not exactly sure why this happens.

The offending code is actually in the [b]getStyle[/b] function of ajax.js:

`

return document.defaultView.getComputedStyle(element, '').getPropertyValue(attribute);

`

Specifically, [b]document.defaultView.getComputedStyle(element, '')[/b], where [b]element[/b] is [i]albumTitleEditable[/i] after it has been transformed by [i](i think)[/i] [b]div.getInputField[/b].

Developer
Developer
trisweb   2005-09-21, 21:03
#2

Thank you! I've been meaning to take a look at this, but it's very hard without an actual copy of safari on a mac.

My roomate has a mac though, so maybe I can borrow it to really fix the bugs.

Member
Member
ballsmag   2005-09-21, 23:45
#3

I'm not sure that there's an actual proper solution right now.. From what I've read, it's a bug in Safari.

I fooled around with it a bit and wasn't able to get the height or width of those altered div's using Javascript.. Maybe there's another way than element.style.[width/offsetWidth/clientWidth]?

Member
Member
dryan   2005-11-28, 19:57
#4

i can't get edits to save when using safari. works fine in firefox. any ideas?

Member
Member
SomethingBig   2005-11-28, 20:07
#5

What do you mean? Aside from MediaTemple thinking I want to log into my control panel (www.somethingbig.org/admin) when I make edits, I still can.

I use Safari 2 in 10.4.3 - is that what you've got too?

Member
Member
dryan   2005-11-28, 20:47
#6

yes, safari 2.0.2 in 10.4.3. i'm using K2 on wordpress and the ajax commenting system works fine there. so i know that safari can send information this way, it just seems that in zenphoto its not saving the new information to the database.

my site is http://www.wdanielryan.com/photography if you want to check it out.

i tried turning off K2 as well in case there was a conflict there. same issue.

Member
Member
thatlittleguy   2006-01-14, 19:01
#7

Same problem here with Safari. The titles and descriptions won't save.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.