68 51 8 LINKEDINCOMMENTMORE

Q: Why do the "Cut," "Copy" and "Paste" commands under the Edit menu inside Google Docs not work in my browser?

A: It can seem kind of crazy when you look at it: Google first put menu items into its Web-based word processor that are merely decorative in most browsers — its own Chrome is one exception — then wrote an error-message dialog telling you to ignore those commands.

But it's the inevitable outcome of two things intersecting: interactive sites that use Web code (in particular, one called JavaScript) to look and act like programs installed directly on your computer, and a standard security precaution in browsers that blocks Web code from any access to the system clipboard.

Why lock them out? Your computer can't tell the difference between a JavaScript-driven action that you took, such as clicking a button in a Web app, and one that a website executed on its own and without your consent. And it's a lot easier to find yourself on a malicious website than to install malicious software on your Mac or PC.

So that's why Google Docs will tell you to use keyboard commands instead to cut, copy or paste things in and out of a document. The keys on the keyboard (as well as Chrome's own menu items) are outside a website's control, so there isn't the same risk of a privacy or security violation.

But if Chrome doesn't let any Web page touch the clipboard (neither does Safari or Mozilla Firefox, while Microsoft's Internet Explorer can ask if a site should get that access), how can those menu items inside Google Docs work as advertised in Chrome?

The answer is that Google gave its Web app a way around its own rules. The version of Google Docs you run in Chrome isn't the same thing as the one you'd use in Safari, Firefox or IE. You're actually running the Google Drive app, which is more than just a Web page — it adds some code to your copy of Chrome that gives Docs full clipboard privileges.

A couple of years ago, you had to install this app yourself, but in a fresh copy of Chrome, logging into Docs sufficed to load it automatically.

Docs isn't the only Web app to run into this problem. Microsoft's Office Web Apps have cut, copy and paste buttons that don't do anything outside of IE, although its error message ("Your browser doesn't allow access to the clipboard") provides a better explanation than Google's vague verbiage ("These actions are unavailable via the Edit menu").

Safari users can into other issues running Google's productivity apps. Google Docs' helpful offline-editing support doesn't work in Safari. And the standard Apple keyboard shortcut to paste text without its prior formatting doesn't do that inside Google Docs in Apple's browser — instead, it inserts a diamond icon into my text.

Google said the latter issue was a bug the company is working to fix.

Lest I sound too cranky, it's a minor coding miracle that these complex Web apps work as consistently as they do across multiple browsers that see constant updates.

"It's constantly a battle to try to continue to give first-class support to all the major browsers," said Ben Dilts, chief technical officer at Lucid Software, a Utah developer of diagramming and publishing Web apps that plug into Google's. Even with help from most browser vendors, he said, "the browsers that you're writing to are a moving target."

(Disclosure: I wrote this column in Google Docs.)

TIP: FOR TRANSIT NAVIGATION, GET A SECOND OPINION

Google Maps was the first mass-market Web app to provide good transit directions and now has an impressively broad reach. But I've seen smaller transit services that publish schedule data in a standard format called GTFS that Google and other mapping sites can read show up on Microsoft's Bing Maps but not Google Maps — for instance, the Fairfax Connector bus routes that traverse some of Washington's Virginia suburbs.

The reason seems to be that Bing doesn't require transit agencies to sign a legal agreement promising to defend it against lawsuits alleging that their data infringes somebody else's patent or copyright. So before you assume from Google's directions that you'll have to take a taxi, check with Microsoft.

Rob Pegoraro is a tech writer based out of Washington, D.C. To submit a tech question, e-mail Rob atrob@robpegoraro.com. Follow him on Twitter at twitter.com/robpegoraro.

68 51 8 LINKEDINCOMMENTMORE
Read or Share this story: http://usat.ly/1nkxCDa