Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

Copy out of Dashboard Calculator

eharley

macrumors newbie
Original poster
Dec 27, 2007
20
13
I finally go around to upgrading to 10.5 from 10.4

One thing that struck me was that I could no longer copy to the clipboard the result of the computation in the Dashboard's calculator widget. Something I could do under 10.4

I can paste into it. I can copy/paste/cut in the Stickies application. But I can't copy out of the Calculator.

I opened up the .html and .js files for the widget and yes there is a handler for the copy event but its not getting invoked.

Can anyone verify this behavior on their computers? Perhaps there is something wrong with mine.
 

pwn247

macrumors 6502
Aug 30, 2008
301
0
West Virginia, USA
One thing that you can do is open Spotlight, type your equation (like 2+5), and it will give you the answer. I'm not on my Mac right now so I'm not sure as to if you can copy/paste in or out of Spotlight.
 
Comment

eharley

macrumors newbie
Original poster
Dec 27, 2007
20
13
So I found a fix. It looks like the oncopy handler is broken. So I opened up Calculator.html and added a handler for onbeforecopy which calls the same function, docopy().

Here's the new body tag

Code:
<body onbeforecopy='docopy(event);' oncut='docut(event);' oncopy='docopy(event);' onpaste='dopaste(event);'>
 
Comment

lunar

macrumors newbie
Feb 2, 2008
4
0
Awesome! eharley, thanks for posting this fix. It worked wonderfully.

If anyone is wondering, widget HTML is stored in HD>Library>Widgets and then you'll have to right click and "show package contents" on the widget you want to edit.
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.