mirror of
https://github.com/keeweb/keeweb.git
synced 2024-06-21 07:06:39 +02:00
fix emitter copy-paste
This commit is contained in:
parent
11a12cceb4
commit
b7586f5be9
|
@ -47,8 +47,7 @@ AutoTypeEmitter.prototype.setDelay = function(delay) {
|
|||
|
||||
AutoTypeEmitter.prototype.copyPaste = function(text) {
|
||||
logger.debug('CopyPaste', text);
|
||||
Launcher.setClipboardText(text);
|
||||
this.impl.paste(this.callback);
|
||||
this.impl.copyPaste(text, this.callback);
|
||||
};
|
||||
|
||||
AutoTypeEmitter.prototype.waitComplete = function() {
|
||||
|
|
|
@ -56,10 +56,13 @@ AutoTypeEmitterImpl.prototype.key = function(key, callback) {
|
|||
callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitterImpl.prototype.paste = function(callback) {
|
||||
AutoTypeEmitterImpl.prototype.copyPaste = function(text, callback) {
|
||||
this.pendingScript.push('delay 0.5');
|
||||
this.pendingScript.push('set the clipboard to "' + text.replace(/"/g, '\\"') + '"');
|
||||
this.pendingScript.push('delay 0.5');
|
||||
this.pendingScript.push('keystroke "v" using command down');
|
||||
this.pendingScript.push('delay 0.5');
|
||||
this.waitComplete(callback);
|
||||
callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitterImpl.prototype.waitComplete = function(callback) {
|
||||
|
|
|
@ -62,7 +62,8 @@ AutoTypeEmitterImpl.prototype.key = function(key, callback) {
|
|||
callback();
|
||||
};
|
||||
|
||||
AutoTypeEmitterImpl.prototype.paste = function(callback) {
|
||||
AutoTypeEmitterImpl.prototype.copyPaste = function(text, callback) {
|
||||
// todo
|
||||
this.pendingScript.push('^v');
|
||||
this.waitComplete(callback);
|
||||
};
|
||||
|
|
|
@ -36,10 +36,12 @@ var Scrollable = {
|
|||
if (this.scroll) {
|
||||
this.scroll.update();
|
||||
this.requestAnimationFrame(function() {
|
||||
this.scroll.update();
|
||||
var barHeight = this.scrollerBar.height(),
|
||||
wrapperHeight = this.scrollerBarWrapper.height();
|
||||
this.scrollerBarWrapper.toggleClass('invisible', barHeight >= wrapperHeight);
|
||||
if (this.scroll) {
|
||||
this.scroll.update();
|
||||
var barHeight = this.scrollerBar.height(),
|
||||
wrapperHeight = this.scrollerBarWrapper.height();
|
||||
this.scrollerBarWrapper.toggleClass('invisible', barHeight >= wrapperHeight);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -760,7 +760,7 @@ var DetailsView = Backbone.View.extend({
|
|||
autoType: function() {
|
||||
var entry = this.model;
|
||||
AutoType.hideWindow(function() {
|
||||
AutoType.run(entry, '{password}', false, _.noop);
|
||||
AutoType.run(entry, '{password}', true, _.noop);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user