safari

How do you draw text on a <canvas> tag in Safari

I've been experimenting with using the <canvas> tag for drawing simple diagrams and charts, and so far it's pretty easy to work with. I have one issue thought. I can't figure out how to draw text on a <canvas> in Safari. In Firefox 3.0, I can do this: Chart.prototype.drawTextCentered = function(context, text, x, y, font, color) { i...

Why doesn't @contenteditable work on the iPhone?

Safari HTML Reference: Supported Attributes says: contenteditable If true, the element can be edited on the fly; if false, it cannot. Availability Available in Safari 1.2 and later. Available in iPhone OS 1.0 and later. However, on my iPhone, I can't get it to work. Anyone have success with this? You can try it ...

window.open not working when attached on onload event in chrome and safari

I want to open a new window on onload if a particular condition is satisfied works fine in all others but window is not opening in Chrome and Safari would somebody please find a way to do this Duplicate: window.open not working when attached on onload event in chrome and safari ...

Certain elements display smaller in Safari on Mac?

After fiddling around with an issue I am having I have come to this conclusion: my list Elements are displaying smaller in Safari on my Macbook than they are on Safari on my PC. IE, and Firefox are displaying properly also. What might be causing this difference? It is hindering my ability to complete this design. www.christopherbier....

Another Safari width issue with CSS

I am making this web site http://www.christopherbier.com/gbg/locations.html In safari on mac the content div is larger in width than it is in other browsers. It overlaps the right side bar bit. I am not sure how to fix this. Here is my css: #mainwrap { width:1000px; margin-right:auto; margin-left:auto; background-color:...

safari highlighting artifacts when ajax resizes objects above it

On Safari 3.2.1, I observe that if a textarea is highlighted as the active control, and an object above it resizes (e.g., an img loads) there are fragments of highlighting left behind after the textarea moves to accommodate the new layout. How to fix this? ...

jQuery + Safari 4 Beta

I have a (ASP.NET MVC) site that uses jQuery 1.3.2 and my jQuery functions refuse to invoke on Safari 4.0 beta [mac]. I CAN get them to invoke if I change the user-agent to Safari 3.2.1 Mac. This seems strange to me as I can't find any info about jQuery having issues with the beta and I don't know why the user-agent would change that. ...

How can I prevent WebKit browser to submit a form when enter is pressed in an input

When using a form with many text input, WebKit/Safari/Google Chrome submits the form when ''enter'' is pressed in any input element. Even if there is no submit input element and no onclick handler registered. See for instance this sample code: <html> <body> <form method="POST" action="."> <ul> <l...

Safari: Submit form using xhrPost when the Enter key is pressed

I have bound a JavaScript function to the submit button of a form, causing the form to be submitted via an xhrPost request (using Dojo). However, when the user hits "Enter" in Safari, the form is submitted the usual way. Is there any way to prevent Safari from submitting the form when the Enter key is pressed? Can I somehow bind my Java...

iPhone Safari: Scroll a list inside a html container

Hi all, I did a lot of research about this topic and didn't yet find a satisfying answer: How can I make a scrollable list (iPhone SDK Dashboard List) inside some other html content? If I create a list inside a html body and I try to scroll the whole page is scrolled. I know there is this "double finger" scrolling, but that's not what ...

How do I stop safari form submissions in a designMode="on" area

I'm trying to stop form submissions from working in an iframe with designMode set to on. For every browser except safari I can just observe mousedown on window, and stop it if it's a form element. In safari the only way I can get it to not submit is to put onSubmit="return false;" but I would like to find a more global solution like stop...

Safari and Chrome: problem editing input 'size' attribute on the fly

Hi, I have the following bit of code to create an automatically resized text input: // setup quick jump input $("#goto").keydown(function(e){ var size = $(this).val().length; // sanity if ( size < 1 ) { size = 1; } $(this).attr("size",size); // if enter then GOTO-> if ( e.keyCode == 13 ) { window.location.href =...

Unable to get a jQuery script work in Firefox

I have the following script in my homepage $(function () { // same as $(document).ready(function () { }) // assuming we have the open class set on the H2 when the HTML is delivered $('li.drawer h2:not(.open)').next().hide(); $('h2.drawer-handle').click(function () { // find the open drawer, remove the class, move to the UL fo...

Can't get css property of 'content' in Safari 4

I'm having the hardest time figuring out why Firefox3.1 returns the value of 'content' on a test element, while Safari 4 won't. My sample page is setup like: <style> #asd{ content: 'test'; } </style> <div id="asd"> Bleh </div> And my JS is using getComputedStyle. This works for other properties like "background-color" but not for "c...

Can I pop up a confirmation dialog when the user is closing the window in Safari/Chrome?

In IE and FF, i can attach an event handler to onBeforeUnload, and by passing a string to a property of the event, the user will see a dialog asking him whether he wants to continue with the "unloading" (either closing the window or navigating away). Safari and Chrome don't support onBeforeUnload, and onUnload seems to be too late. Is t...

Safari Cache size for iPhone 3.0

Various sites on the internet claims that Safari cache on iPhone 2.2 is 25k and 19 objects. Does anyone know what is the cache size for Safari/webview on iPhone 3.0. ...

Facebook Connect button not showing up in Safari/Chrome

My implementation of Facebook Connect (just a simple login button, fb:login-button) works perfectly on Firefox and IE. But the same button is not showing up in Safari/Chrome (Webkit). Here's what's ironic. In my debugging effort, I saved the page (that contains fb:login-button) up as a static page and then load it in Safari. And the bu...

What are my options for strong CSS development against Safari

Hello, I can use FireFox and FireBug, in a pane, I can open a .css file, in real time, as I make edits, I can see those edits reflected in FireFox. This is a very handy and valuable feature. Without starting a debate over browsers, I would love to be able to do the same thing in Safari. My far too small display on this laptop aside, re...

launch safari from iphone app

This might be a rather obvious question, but can you launch the Safari browser from an iphone app? all the best. ...

How do I make an element scale down to nothing using a CSS transition on the iPhone?

I’m trying to use the proprietary iPhone Safari properties -webkit-transition and -webkit-transform to make an element disappear with a graceful animation. Code: <div id="right" style="font-size: 500%; text-align: center; background-color: #fdf; -webkit-transition-property: -webkit-transform; -webkit-transition-duration: 1s;">3</div> <...