I decided to dig into it. I couldn't fix the main issue, but at least the result is a noticeably less annoying experience.
What the following patch does is hide all cursors in stickies when the Dashboard is hidden, and regain cursor focus on a particular sticky when it is clicked upon. You will still get blinking cursors if you keep click/type on several stickies during the same "session" (i.e. before hiding the Dashboard again) – which is far better than all cursors blinking all the time.
Step 1: Copy the following and save it on a file called "patch.diff" on your Desktop
--- original.js 2013-01-11 00:23:44.000000000 +0100
+++ fixed.js 2013-01-11 00:22:35.000000000 +0100
@@ -48,7 +48,7 @@
moveCaretToEnd();
window.addEventListener("click", function() {moveCaretToEnd();}, false);
- mydiv.addEventListener("click", function(e) {e.stopPropagation();}, false);
+ mydiv.addEventListener("click", function(e) {mydiv.contentEditable = pdiv.contentEditable = true; e.stopPropagation();}, false);
document.title = localizedStrings['WidgetDisplayName:'] + ' ' + mydiv.innerText;
@@ -83,6 +83,9 @@
if (window.widget) {
widget.onremove = onremove;
widget.onsync = onsync;
+ widget.onhide = function () {
+ mydiv.contentEditable = pdiv.contentEditable = false;
+ };
}
function $(id) {
@@ -191,7 +194,13 @@
function handleTyping(event)
{
- if(event.keyCode == 9) //prevent tab key
+ if(event.metaKey && event.shiftKey && event.keyCode == 90) {
+ document.execCommand("Redo");
+ }
+ else if(event.metaKey && event.keyCode == 90) {
+ document.execCommand("Undo");
+ }
+ else if(event.keyCode == 9) //prevent tab key
{
consumeEvent(event);
return;
Step 2: Execute the following command in the Console
sudo patch /Library/Widgets/Stickies.wdgt/Stickies.js < ~/Desktop/patch.diff
Step 3: Access the dashboard, and hit Cmd+R on each sticky. You will notice a "whirlpool" effect which means it is reloaded using the new code.
Step 4: Hide the dashboard, and display it again. You will notice no cursors. If you click on a sticky, you will get the cursor for that one.
As a bonus, you get undo (hitting Cmd+Z) and redo (hitting Cmd+Shift+Z), just like in any text editor.