Restore previous focus after setting HTML5 clipboard
This commit is contained in:
@@ -915,6 +915,9 @@ class HTML5Window
|
||||
textArea.style.width = "0px";
|
||||
Browser.document.body.appendChild(textArea);
|
||||
}
|
||||
|
||||
var cacheElement = Browser.document.activeElement;
|
||||
|
||||
textArea.value = value;
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
@@ -923,6 +926,11 @@ class HTML5Window
|
||||
{
|
||||
Browser.document.execCommand("copy");
|
||||
}
|
||||
|
||||
if (cacheElement != null && cacheElement != textArea)
|
||||
{
|
||||
cacheElement.focus();
|
||||
}
|
||||
}
|
||||
|
||||
public function setCursor(value:MouseCursor):MouseCursor
|
||||
|
||||
Reference in New Issue
Block a user