Re: [editing-explainer] Should execCommand be spec'd to do nothing in cE=typing? (#33)

I want to make sure we’re all on the same page. The idea of contentEditable=’typing’ is to get rid of all of the default input behavior of browsers on user interaction (other than typing characters). So enter key, delete key, keyboard shortcuts, drag and drop, browser toolbars, etc have no effect besides firing device independent events. However, if a site calls a javascript API like appendChild or execCommand it should work. Why would we want to disable any javascript from working exactly as it works today? We shouldn’t need to update the selection normalization in those commands either. If script calls them it needs to deal with any fallout.

From: Frederico Caldeira Knabben [mailto:notifications@github.com]
Sent: Tuesday, December 16, 2014 3:12 AM
To: w3c/editing-explainer
Cc: Ben Peters
Subject: Re: [editing-explainer] Should execCommand be spec'd to do nothing in cE=typing? (#33)


I was wondering if UAs will have to introduce a whole new bunch of code to be able to handle execCommand on cE=typing properly. I mean, there may be differences in things like selection that will force UAs to handle things differently. Some commands, like "delete", are even supposed to not be handled by UAs in cE=typing.

The above, other than eventually slowing down the adoption of cE=typing, will also push forward one of the biggest problems with cE=true, where commands have no specs.

  *   Option 1: explicitly declare that execCommand is to be supported, in the new cE=typing specs.
  *   Option 2: explicitly declare that execCommand must have no behavior, in the new cE=typing specs.
  *   Option 3: completely ignore execCommand and see this as an independent API out of the contenteditable specs and scope.

I tend to like "Option 3".

—
Reply to this email directly or view it on GitHub<https://github.com/w3c/editing-explainer/issues/33#issuecomment-67144328>.


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing-explainer/issues/33#issuecomment-67216312

Received on Tuesday, 16 December 2014 19:26:12 UTC