Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorcmrd Senya <35317-cmrd-senya@users.noreply.gitlab.gnome.org>2022-07-17 22:49:29 +0300
committercmrd Senya <35317-cmrd-senya@users.noreply.gitlab.gnome.org>2022-07-17 22:49:29 +0300
commit7b3ff3707901cb8b7a83f072ee777c9b97109091 (patch)
treeee02689c44cd82a6fd7ec88285af9bce0f3ef7d9 /app
parentac39716ab4c486a7514cb8727fbaa8a85ba905d6 (diff)
Replace textchange with native input event
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/app/views/publisher_view.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js
index 64f90c1d3..183c38b48 100644
--- a/app/assets/javascripts/app/views/publisher_view.js
+++ b/app/assets/javascripts/app/views/publisher_view.js
@@ -21,7 +21,7 @@ app.views.Publisher = Backbone.View.extend({
"focus textarea" : "open",
"submit form" : "createStatusMessage",
"click #submit" : "createStatusMessage",
- "textchange #status_message_text": "checkSubmitAvailability",
+ "input #status_message_text": "checkSubmitAvailability",
"click #locator" : "showLocation",
"click #poll_creator" : "togglePollCreator",
"click #hide_location" : "destroyLocation",
@@ -51,10 +51,6 @@ app.views.Publisher = Backbone.View.extend({
this.$(".question_mark").hide();
}
- // this has to be here, otherwise for some reason the callback for the
- // textchange event won't be called in Backbone...
- this.inputEl.bind("textchange", $.noop);
-
$("body").click(function(event) {
var $target = $(event.target);
if ($target.closest("#publisher").length === 0 && !$target.hasClass("dropdown-backdrop")) {
@@ -133,10 +129,6 @@ app.views.Publisher = Backbone.View.extend({
if (photoAttachments.length > 0) {
new app.views.Gallery({el: photoAttachments});
}
- },
-
- onChange: function() {
- self.inputEl.trigger("textchange");
}
};
@@ -368,8 +360,7 @@ app.views.Publisher = Backbone.View.extend({
// clear text
this.inputEl.val("");
- this.inputEl.trigger("keyup")
- .trigger("keydown");
+ this.inputEl.trigger("input");
autosize.update(this.inputEl);
// remove photos
@@ -403,9 +394,6 @@ app.views.Publisher = Backbone.View.extend({
// clear poll form
this.viewPollCreator.clearInputs();
- // force textchange plugin to update lastValue
- this.inputEl.data("lastValue", "");
-
return this;
},