Uploaded image for project: 'Wave'
  1. Wave
  2. WAVE-342

"Paste without Formating" (Ctrl+Shift+V / Cmd+Option+Shift+V) in Firefox causes rendering issues (desynchronization between rendering and actual content)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.1
    • None
    • Web Client
    • None
    • Ubuntu 11.10, Firefox 11; Windows, Firefox 10 and Firefox 11.
      On a Wave Editor embedded in a GWT app, but also reproduced on waveinabox.net

    Description

      When "pasting without formatting" several lines at a time in a blip (Wave Editor), Firefox inserts line breaks, but they're not sent to the server (neither persisted in the Wave nor sent to other clients in real-time); only the text is persisted.

      Actually, Firefox does not generate a paste event (see https://bugzilla.mozilla.org/show_bug.cgi?id=741734 ), so the Wave Editor falls back to mutation events and the TypingExtractor.
      Firefox inserts "foo<br><br>bar" in the editor, but the TypingExtractor does not handle the <br> (it simply ignores them, see ContentDocument.FilteredHtml; called from TypingExtractor.TypingState::calculateNewValue(), via ContextTextNodes.sumTextNodes()) and in the end only inserts the text from the text nodes in the document.
      Because the EditorImpl.typingSink uses sourceNindoWithoutModifyingHtml (via applyRepairingOperation), the Html view is no longer in sync with the model, which then causes a few issues when editing (only way to "fix" it is to reload the wave, e.g. by opening another wave and then going back).

      I tried capturing the Ctrl+Shift+V (in the EditorImpl's EditorEventsSubHandler) and calling handlePaste but that doesn't work: Firefox does not seem to paste into the hidden div.

      As a last resort, I changed QuirksConstants and EditorEventHandler to blacklist the Ctrl+Shift+V (Cmd+Option+Shift+V on Mac) combo on Firefox. This will completely disable "paste without formatting".

      Attachments

        Activity

          People

            Unassigned Unassigned
            t.broyer Thomas Broyer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: