mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 788431 - Ctrl-C in the Rule View and the Property view doesn't work. r=paul
This commit is contained in:
parent
fceb034334
commit
3a740f52c0
@ -133,6 +133,7 @@ this.CssHtmlTree = function CssHtmlTree(aStyleInspector)
|
||||
this.getRTLAttr = chromeReg.isLocaleRTL("global") ? "rtl" : "ltr";
|
||||
|
||||
// Create bound methods.
|
||||
this.siFocusWindow = this.focusWindow.bind(this);
|
||||
this.siBoundMenuUpdate = this.computedViewMenuUpdate.bind(this);
|
||||
this.siBoundCopy = this.computedViewCopy.bind(this);
|
||||
this.siBoundCopyDeclaration = this.computedViewCopyDeclaration.bind(this);
|
||||
@ -140,6 +141,7 @@ this.CssHtmlTree = function CssHtmlTree(aStyleInspector)
|
||||
this.siBoundCopyPropertyValue = this.computedViewCopyPropertyValue.bind(this);
|
||||
|
||||
this.styleDocument.addEventListener("copy", this.siBoundCopy);
|
||||
this.styleDocument.addEventListener("mousedown", this.siFocusWindow);
|
||||
|
||||
// Nodes used in templating
|
||||
this.root = this.styleDocument.getElementById("root");
|
||||
@ -557,6 +559,17 @@ CssHtmlTree.prototype = {
|
||||
menuitem.disabled = disablePropertyItems;
|
||||
},
|
||||
|
||||
/**
|
||||
* Focus the window on mousedown.
|
||||
*
|
||||
* @param aEvent The event object
|
||||
*/
|
||||
focusWindow: function si_focusWindow(aEvent)
|
||||
{
|
||||
let win = this.styleDocument.defaultView;
|
||||
win.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Copy selected text.
|
||||
*
|
||||
@ -704,6 +717,7 @@ CssHtmlTree.prototype = {
|
||||
|
||||
// Remove bound listeners
|
||||
this.styleDocument.removeEventListener("copy", this.siBoundCopy);
|
||||
this.styleDocument.removeEventListener("mousedown", this.siFocusWindow);
|
||||
|
||||
// Nodes used in templating
|
||||
delete this.root;
|
||||
|
@ -1402,6 +1402,8 @@ RuleEditor.prototype = {
|
||||
}.bind(this), false);
|
||||
|
||||
this.element.addEventListener("mousedown", function() {
|
||||
this.doc.defaultView.focus();
|
||||
|
||||
let editorNodes =
|
||||
this.doc.querySelectorAll(".styleinspector-propertyeditor");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user