Watch paste events on input fields. Fixes #730.

This commit is contained in:
Tom Morris 2013-06-23 13:37:29 -04:00
parent a3b4b45e4e
commit bad5bc37b2
6 changed files with 8 additions and 6 deletions

View File

@ -204,7 +204,7 @@ ClusteringDialog.prototype._renderTable = function(clusters) {
var input = $('<input type="text" size="25" />') var input = $('<input type="text" size="25" />')
.attr("value", cluster.value) .attr("value", cluster.value)
.keyup(function() { .bind("keyup change input",function() {
cluster.value = this.value; cluster.value = this.value;
}).appendTo(tr.insertCell(4)); }).appendTo(tr.insertCell(4));
}; };

View File

@ -131,7 +131,7 @@ ExpressionPreviewDialog.Widget = function(
var self = this; var self = this;
this._elmts.expressionPreviewTextarea this._elmts.expressionPreviewTextarea
.attr("value", this.expression) .attr("value", this.expression)
.keyup(function(){ .bind("keyup change input",function(){
self._scheduleUpdate(); self._scheduleUpdate();
}) })
.select() .select()

View File

@ -41,7 +41,7 @@ TemplatingExporterDialog.prototype._createDialog = function() {
var self = this; var self = this;
var dialog = $(DOM.loadHTML("core", "scripts/dialogs/templating-exporter-dialog.html")); var dialog = $(DOM.loadHTML("core", "scripts/dialogs/templating-exporter-dialog.html"));
this._elmts = DOM.bind(dialog); this._elmts = DOM.bind(dialog);
this._elmts.controls.find("textarea").keyup(function() { self._scheduleUpdate(); }); this._elmts.controls.find("textarea").bind("keyup change input",function() { self._scheduleUpdate(); });
this._elmts.exportButton.click(function() { self._export(); self._dismiss(); }); this._elmts.exportButton.click(function() { self._export(); self._dismiss(); });
this._elmts.cancelButton.click(function() { self._dismiss(); }); this._elmts.cancelButton.click(function() { self._dismiss(); });

View File

@ -126,10 +126,12 @@ TextSearchFacet.prototype._initializeUI = function() {
if (this._query) { if (this._query) {
elmts.input[0].value = this._query; elmts.input[0].value = this._query;
} }
elmts.input.keyup(function(evt) {
elmts.input.bind("keyup change input",function(evt) {
self._query = this.value; self._query = this.value;
self._scheduleUpdate(); self._scheduleUpdate();
}).focus(); }).focus();
}; };
TextSearchFacet.prototype.updateState = function(data) { TextSearchFacet.prototype.updateState = function(data) {

View File

@ -231,7 +231,7 @@ Refine.DefaultImportingController.prototype._renderFileSelectionPanelControlPane
this._updateFileSelectionSummary(); this._updateFileSelectionSummary();
this._fileSelectionPanelElmts.regexInput.unbind().keyup(function() { this._fileSelectionPanelElmts.regexInput.unbind().bind("keyup change input",function() {
var count = 0; var count = 0;
var elmts = self._fileSelectionPanelElmts.filePanel var elmts = self._fileSelectionPanelElmts.filePanel
.find(".default-importing-file-selection-filename") .find(".default-importing-file-selection-filename")

View File

@ -131,7 +131,7 @@ HistoryPanel.prototype._render = function() {
elmts.helpDiv.hide(); elmts.helpDiv.hide();
elmts.filterInput.keyup(function() { elmts.filterInput.bind("keyup change input",function() {
var filter = $.trim(this.value.toLowerCase()); var filter = $.trim(this.value.toLowerCase());
if (filter.length === 0) { if (filter.length === 0) {
elmts.bodyDiv.find(".history-entry").removeClass("filtered-out"); elmts.bodyDiv.find(".history-entry").removeClass("filtered-out");