iOS 5 "position: fixed" and virtual keyboard issues
The ipad onscreen keyboard changes position:fixed
style to position:static
that misplaces those elements and you'll have problems on each page with a form, e.g. search field.
There are several workarounds/hacks but no straight forward fix yet. Expect additional expense.
Related cards:
Disable text selection on iOS and Android devices
When you double-tap a string of text on an iPhone or iPad a complicated context menu for copying and pasting will appear. This can confuse unexperienced users.
Use the Javascript hack below to disable text selection on mobile devices:
// Dea...
Fix external Displays switching not on when plugging notebook in docking station
If your external displays not switching on or showing a weird behavior (for e.g. all displays getting the same configuration all the time) you can fix it by switching off all external displays and re-enabling only one in the first step. Afterwards...
Autoplay HTML5 audio in Chrome for Android, Mobile Safari in iOS
- Mobile browser's ignore the
autoplay
attribute on<audio>
and<video>
elements. Stupid reasons include saving mobile bandwidth on behalf of the user and/or securing app store sales. - Audio and video elements will only play as the result o...
There is no real performance difference between "def" and "define_method"
You can define methods using def
or define_method
. In the real world, there is no performance difference.
define_method
is most often used in metaprogramming, like so:
define_method :"#{attribute_name}_for_realsies?" do
do_things...
How to view Image Metadata on the Linux Command Line with ImageMagick
ImageMagick has a command line tool called identify
which can read image metadata:
>identify -verbose DSC00136.JPG
Image: DSC00136.JPG
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 5472x3648+...
Security issues with hash conditions in Rails 2 and Rails 3
Find conditions for scopes can be given either as an array (:conditions => ['state = ?', 'draft']
) or a hash (:conditions => { 'state' => 'draft' }
). The later is nicer to read, but has horrible security implications in some versions of Ru...
A community-curated list of flexbox issues and cross-browser workarounds for them
This repository is a community-curated list of flexbox issues and cross-browser workarounds for them. The goal is that if you're building a website using flexbox and something isn't working as you'd expect, you can find the solution here.
As...
Native app install banners in Android, iOS
You can make both mobile Chrome and mobile Safari display a native app install banner. The banner suggests that the user installs an app that is related to the current page. It is shown in the phone's native UI. See attached animation.
There is s...
Detect mobile or touch devices on both server and client
Although it's tempting flirt with detecting mobile/touch devices with CSS media queries or Javascript feature detection alone, this approach will be painful when heavily customizing a feature beyond just tweaking the looks. Eventually you will wan...
Better HTML forms: use type, inputmode, enterkeyhint and autocomplete
Web forms can be made much more usable with a few HTML attributes. Short summary:
-
type
: Tells browsers about the input data type. Mobile browsers will select a...