All Questions

117
votes
2answers
68968 views

Chrome / Safari not filling 100% height of flex parent

I want to have a vertical menu with a specific height. Each child must fill the height of the parent and have middle-aligned text. The number of children is random, so I have to work with dynamic va...
226
votes
13answers
165222 views

Convert Data URI to File then append to FormData

I've been trying to re-implement an HTML5 image uploader like the one on the Mozilla Hacks site, but that works with WebKit browsers. Part of the task is to extract an image file from the canvas objec...
256
votes
30answers
355813 views

Get the real width and height of an image with JavaScript? (in Safari/Chrome)

I am creating a jQuery plugin. How do I get real image width and height with Javascript in Safari? Following works with Firefox 3, IE7 and Opera 9: var pic = $("img") // need to remove these in of...
216
votes
22answers
147601 views

How can I force WebKit to redraw/repaint to propagate style changes?

I have some trivial JavaScript to effect a style change: sel = document.getElementById('my_id'); sel.className = sel.className.replace(/item-[1-9]-selected/,'item-1-selected'); return false; This w...
197
votes
5answers
285078 views

Custom CSS Scrollbar for Firefox

I want to custom-style a scrollbar with CSS. I use this WebKit CSS code, which works well for Safari and Chrome: ::-webkit-scrollbar { width: 15px; height: 15px; } ::-webkit-scrollbar-track-piece ...
308
votes
16answers
602219 views

Maximum call stack size exceeded error

I am using a Direct Web Remoting (DWR) JavaScript library file and am getting an error only in Safari (desktop and iPad) It says Maximum call stack size exceeded. What exactly does this error ...
60
votes
5answers
121339 views

Firing a Keyboard Event in JavaScript

I'm trying to simulate a keyboard event in Safari using JavaScript. I have tried this: var event = document.createEvent("KeyboardEvent"); event.initKeyboardEvent("keypress", true, true, null, false,...
172
votes
12answers
140217 views

Detect rotation of Android phone in the browser with JavaScript

I know that in Safari on an iPhone you can detect the screen's orientation and change of orientation by listening for the onorientationchange event and querying window.orientation for the angle. Is t...
372
votes
13answers
407848 views

Submitting a form on 'Enter' with jQuery?

I have a bog-standard login form - an email text field, a password field and a submit button on an AIR project that's using HTML/jQuery. When I hit Enter on the form, the entire form's contents vanis...
115
votes
6answers
63606 views

How does the paste image from clipboard functionality work in Gmail and Google Chrome 12+?

I noticed a blog post from Google that mentions the ability to paste images directly from the clipboard into a Gmail message if you're using the latest version of Chrome. I tried this with my version...

Previous Next