If you’re using macOS 14.7.3 and experiencing an annoying issue where clicking a running app’s icon in the Dock doesn’t immediately make it active for typing, you’re not alone. Instead of the expected behavior—where the app comes to the forefront, ready for interaction—you might find yourself having to click inside the app’s window before you […]
Use AutoRaise! From the docs: “When you hover a window it will be raised to the front (with a delay of your choosing) and gets the focus.” Web page: https://github.com/sbmpost/AutoRaise Download: https://github.com/sbmpost/AutoRaise/archive/refs/heads/master.zip
Here is a VERY simplistic watermark code snippet. It has the distinct disadvantage of submitting the watermark string as the field value, and does not set the initial field value either…YMMV…
1
2
3
4
5
6
7
jQuery('#yourInput')
.focusin(function(){
if(jQuery('#yourInput').val()=='Enter keywords to search for')jQuery('#yourInput').val('');
})
.focusout(function(){
if(jQuery('#yourInput').val()=='')jQuery('#yourInput').val('Enter keywords to search for');
Important Note: This solution REQUIRES jQuery 1.6 or better due to the addition of the :focus selector! Here is how I used it for a form in a jQuery UI dialog:
As of jQuery 1.4.1 .live() can accept multiple, space-separated events, similar to the functionality provided in .bind(). For example, we can “live bind” the click and focus events at the same time like so: