Page MenuHomePhabricator

Unable to remove bold and italic formatting from pastes of external sources
Closed, InvalidPublic

Description

If I highlight and copy the first line from
https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox&oldid=665152291
and paste it into
https://en.wikipedia.org/w/index.php?title=User:Quiddity_(WMF)/sandbox&veaction=edit
then it becomes impossible to remove the bold:

  • If I highlight the text, and clicking the "Bold" button in the toolbar, nothing happens
  • If I highlight the text, the "clear styling" option is not even available. (screenshot)

The same (nothing) happens if I select the full line, rather than just the bold text, and try adding/removing/clearing the styling.

Selection_001.png (926×612 px, 105 KB)


Originally reported by Thryduulf as: Bold and underline preserved from pasted source unremovable

When copy and pasting formatted text (bold, italic, bold italic) into VE the formatting is not removable
Steps to Reproduce: To reproduce (but not every time - I haven't figured out the trigger):

  1. Copy bold, italic or bold/italic text
  2. Paste into a VE editing surface
  3. Try to remove the formatting using any of:
    • Keyboard shortcuts (e.g. ctrl+B)
    • Menu action (e.g. selecting "Bold" from the A menu)
    • Selecting clear styling from the menu

Results: Pasted formatting was not possible to remove. Added formatting was (e.g. making the bold text bold italic worked, and the italic could be removed but the bold could not)
Expectations: Formatting should be removable
Notes:

  • Other formatting (e.g. subscript and strikethrough) does not exhibit this bug
  • Copy and pasting within the editing surface does not seem to exhibit the bug

Event Timeline

Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity subscribed.
nshahquinn-wmf set Security to None.

Verified on Firefox 41.0a2.

I don't see anything odd in the linear model or the HTML. However, the problem goes away once the page is saved and reopened.

Deskana subscribed.

Neither of these issues can be reproduced any more.