Closed whsieh closed 6 years ago
@choniong @johanneswilm
Also in this case I believe it is something only Safari has and it can therefore still be changed. I will update the draft spec later today and I will put it on the agenda for the next call, so we can reverse the change in case it is being used somewhere else by now.
Or does Chrome's touchbar support also include support for the text formatting operations by now? In that case it will be more difficult to fix any of the types that were Safari-only until now. @choniong @whsieh
@whsieh I have tested Chrome and Safari on Mac OS X, and it looks like Chrome doesn't use the touchbar for operations related to contenteditable nor input, nor can I find any keyboard shortcuts to do so.
On Safari, the block-justify button emits an "formatJustifyLeft" beforeinput event, and that is clearly incorrect. Also, it looks like that button stays highlighted if the caret is inside justified content, which probably creates an entirely new category of issues because the highlighting will probably not work if the JS editor uses different markup to make the text be block justified.
As for naming: On various pages on the net I find "left justify" described as being synonymous with "left align" or "flush left" [1]. The term we have chosen here is maybe not the most common, but it seems to be correct. @whsieh Is ti really necessary to change the vocabulary for left and right justify, or would it be enough to add a "formatJustifyFull"?
[1] http://www.webopedia.com/TERM/L/left_justify.html [2] https://www.collinsdictionary.com/dictionary/english/left-justify
@johanneswilm I see — if "{left|center|right} justification" is synonymous with "{left|center|right} alignment" in most contexts, then adding a new formatJustifyFull
input type and having the justification formatting button (the rightmost button on the touch bar) emit this new input type sounds good to me.
Perfect. Thatwe can just add as it won't affect anything else.
approved by today's editing taskforce call, fixed in https://github.com/w3c/input-events/commit/95b1b4802a1967ef14b9aff1a0fa005c7857015d
On the newer touch bar MacBooks, there is UI for formatting rich text to be left-aligned, center-aligned, right-aligned, and justified; these apply
text-align: {left|center|right|align}
styles to the current selection. The current spec (link: https://w3c.github.io/input-events/index.html) enumerates "formatJustifyCenter", "formatJustifyRight" and "formatJustifyLeft" input types.Is there any way in the current input events spec to distinguish between selecting a formatting option that justifies text, versus a formatting option that left-aligns text without justifying? It seems like we might benefit from having "formatAlign{Left|Center|Right}" input types, and a "formatJustify" input type for UI that just applies justified format (respecting LTR/RTL text direction).
(corresponding WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=168669)