[w3c/clipboard-apis] Aling 'set clipboard event target' spec. to current implementation 'out there' (#40)

[This example](https://jsfiddle.net/hx4m0bLc/6/) shows that current implementation of setting clipboard event target in e.g. chromium based browsers and firefox does not follow the [spec.](https://w3c.github.io/clipboard-apis/#to-fire-a-clipboard-event) (point 6) (handler installed on not-editable element is invoked, which is against the spec.)

[Other example](https://jsfiddle.net/mwrobel/hx4m0bLc/16/) which follows [spec.](https://w3c.github.io/clipboard-apis/#to-fire-a-clipboard-event) works on firefox but doesn't work on chromium based browsers.

Since there is a code 'out there' which depends on implementation rather then spec., I would suggest to change the [spec.](https://w3c.github.io/clipboard-apis/#to-fire-a-clipboard-event) point 6 to follow current implementations:

(...)

Let target be set as follows:

If selection is [empty](https://www.w3.org/TR/selection-api/#dfn-empty):
 - Set target to be the DOM anchor of the focusable area, or the body element if no node has focus.
else
 - Set target to be the element that contains the start of the selection in document order, or the body element if there is no selection or cursor.

(...)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/40

Received on Friday, 10 March 2017 15:22:28 UTC