Re: [csswg-drafts] [css-ui-3] auto cursor should behaves as default cursor except for text?

Hey @frivoal, I was prototyping a change in Edge that would make us match the spec, but I found out I disagree with the test you wrote; when this issue was resolved I read the following reply to @dbaron's questions and thought that if this was correct I agreed with your proposed spec text, but this does not seem to be properly reflected in the spec.

> > `auto` means `text` for text and for anything editable, and `default` otherwise (@dbaron)
> 
> This is per spec. (@frivoal)


Here is what the spec currently says:
> The UA determines the cursor to display based on the current context, specifically: auto behaves as text over text, and default otherwise. 

Here is what I think the spec should say:
> The UA determines the cursor to display based on the current context, specifically: auto behaves as text over **selectable** text **and editable regions**, and default otherwise. 

`selectable text` is required to allow text in "user-select:none" (or disabled inputs or even text inside the button tag) not to require a text cursor, while `and editable regions` is required to allow a text cursor in a contentEditable div having no content at all, as well as textarea and input with cursor:auto.

Changing the spec in such a way makes all browser pass the test, but the test stops being exhaustive enough to cover all cases. I wrote a new test covering more cases as part of my change, and it shows that currently only Firefox passes the test (and my prototype in Edge).

```
   <p>The test passes if, when moved over every element inside the blue box, the cursor becomes a text-editing cursor over editable regions or selectable text and remains the platform-dependent default cursor otherwise.</p>
 <div id="test">
    
    <a><br></a>
    <a>linklinklinklinklinklinklinklink</a>
    <a href="javascript:void(0)"><br></a>
    <a href="javascript:void(0)">linklinklinklinklinklinklinklink</a>
    
    <button>button</button>
    <button disabled>button</button>
    <button style="-webkit-appearance:none;appearance:none">button</button>
    <button disabled style="-webkit-appearance:none;appearance:none">button</button>
    
    <textarea></textarea>
    <textarea disabled>abc</textarea>
    <textarea style="-webkit-appearance:none;appearance:none"></textarea>
    <textarea disabled style="-webkit-appearance:none;appearance:none">abc</textarea>
    
    <input />
    <input disabled />
    <input style="-webkit-appearance:none;appearance:none" />
    <input disabled style="-webkit-appearance:none;appearance:none" />
    
    <input type="button" value="input-button" />
    <input type="button" value="input-button" disabled />
    <input type="button" value="input-button" style="-webkit-appearance:none;appearance:none" />
    <input type="button" value="input-button" disabled style="-webkit-appearance:none;appearance:none" />
    
    <select></select>
    <select disabled></select>
    <select style="-webkit-appearance:none;appearance:none"></select>
    <select disabled style="-webkit-appearance:none;appearance:none"></select>
    
    <div contentEditable="true"><br></div>
    <div><br></div>
    
  </div>
```


-- 
GitHub Notification of comment by FremyCompany
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1598#issuecomment-335563950 using your GitHub account

Received on Tuesday, 10 October 2017 18:24:08 UTC