Changeset 53242 in webkit


Ignore:
Timestamp:
Jan 13, 2010 11:42:39 PM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2010-01-13 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Timothy Hatcher.

Web Inspector: use hidden text area for clipboard in order to
workaround windows setData bug.

https://bugs.webkit.org/show_bug.cgi?id=33633

  • inspector/front-end/TextEditor.js: (WebInspector.TextEditor): (WebInspector.TextEditor.prototype._copy):
  • inspector/front-end/inspector.css:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53241 r53242  
     12010-01-13  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector: use hidden text area for clipboard in order to
     6        workaround windows setData bug.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=33633
     9
     10        * inspector/front-end/TextEditor.js:
     11        (WebInspector.TextEditor):
     12        (WebInspector.TextEditor.prototype._copy):
     13        * inspector/front-end/inspector.css:
     14
    1152010-01-13  Mads Ager  <ager@chromium.org>
    216
  • trunk/WebCore/inspector/front-end/TextEditor.js

    r53205 r53242  
    4949    this._sheet.className = "text-editor-sheet";
    5050    this._container.appendChild(this._sheet);
     51
     52    this._clipboard = document.createElement("textarea");
     53    this._clipboard.className = "text-editor-clip";
     54    this._container.appendChild(this._clipboard);
    5155
    5256    var cursorElement = document.createElement("div");
     
    736740        var text = this._textModel.copyRange(range);
    737741
    738         e.preventDefault();
    739         e.clipboardData.clearData();
    740         e.clipboardData.setData("Text", text);
     742        this._clipboard.value = text;
     743        this._clipboard.select();
    741744    },
    742745
  • trunk/WebCore/inspector/front-end/inspector.css

    r53141 r53242  
    37893789}
    37903790
    3791 .text-editor-sheet {
     3791.text-editor-sheet, .text-editor-clip {
    37923792    opacity: 0;
    37933793}
Note: See TracChangeset for help on using the changeset viewer.