Page MenuHomePhabricator

Ctrl-I and Ctrl-B cause a flash of styled content in Chrome with Syntax Highlighting in 2010 wikitext editor
Open, LowPublic

Description

Steps to reproduce:

  1. Enable CodeMirror's Syntax Highlighting (Beta Feature).
  2. Open a page in the 2010 WikiEditor using Chrome.
  3. Select some text.
  4. Press Ctrl-I or Ctrl-B.
  5. See the flash of styled content.

First reported by @fireattack at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Shortcuts_(Ctrl+I,_Ctrl+B_etc.)_don't_work_any_more_in_source_code_editor

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Note that on Mac it's Cmd+I and Cmd+B.

For me, the boldening/italicizing do not work even with CodeMirror turned off, but interestingly CodeMirror (for a split second!) seems to think it will work. So maybe the issue isn't CodeMirror?

If by CodeMirror you mean syntax highlighting, yeah, the bug (shortcuts don't work) is there regardless; just that Syntax Highlighting will give some weird visuals, like it's trying..

I should also mention these shortcuts don't work on Firefox either, but I think they're simply overridden by Firefox's built-in shortcuts (both ctrl+B and ctrl+I seem to be toggling "bookmark sidebar" on Firefox).

TBolliger renamed this task from Ctrl-I and Ctrl-B cause a flash of styled content in Chrome with Syntax Highlighting to Ctrl-I and Ctrl-B cause a flash of styled content in Chrome with Syntax Highlighting in 2010 wikitext editor.Mar 20 2018, 9:28 PM
TBolliger triaged this task as Low priority.
TBolliger removed a project: Community-Tech.
TBolliger subscribed.

This is odd but does not break any content. It would be a lot of effort for minimal value so Community Tech cannot commit to addressing this ticket.

I think my question is, are these shortcuts supposed to work?

If not, yeah this visual annoyance is very trivial.

Otherwise, I think "broken shortcuts" is a more serious bug and the ticket's subject should be modified to reflect that.

No, Ctrl+B and Ctrl+I are not supposed to have any effect in the 2010 wikitext editor.

In VisualEditor's 2017 wikitext mode, these shortcuts add formatting (e.g., Command-B on a Mac produces '''Bold''').

Bhsd subscribed.

This will automatically be fixed with CodeMirror 6 upgrade.