[editing] execCommand('inserttext',...) behavior (#112)

I have a question about space canonicalization that happens in the browser when an user inserts or removes text or when it is done through execCommand(‘inserttext’,...). Spec: https://w3c.github.io/editing/execCommand.html#canonical-space-sequences  – section 9.7.

I’ve been investigating what happens in Chrome when we have a situation with multiple spaces in the string: ‘  foo  bar  ‘.

It seems that there is a bug in Chrome. I was not able to investigate what happens in Firefox as I couldn’t see insertion of &nbsp in Firefox console. Not sure if Firefox is inserting it but it is not displayed in the console or like Edge, they are not doing it. 

Chrome folks: this looks like a bug

Here is the sample: https://jsfiddle.net/mwvywtze/ .

Expected output:

some text  foo  bar  

Actual output:

some text  foo  bar  


thanks,
--grisha

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/112

Received on Tuesday, 26 January 2016 19:15:55 UTC