Page MenuHomePhabricator

D17794.diff
No OneTemporary

D17794.diff

diff --git a/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js b/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js
--- a/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js
+++ b/webroot/rsrc/js/core/behavior-phabricator-remarkup-assist.js
@@ -393,6 +393,12 @@
return;
}
+ // Let other listeners (particularly the inline autocomplete) have a
+ // chance to handle this event.
+ if (JX.Stratcom.pass()) {
+ return;
+ }
+
var raw = e.getRawEvent();
if (raw.shiftKey) {
// If the shift key is pressed, let the browser write a newline into
@@ -412,8 +418,7 @@
// This allows 'workflow' and similar actions to take effect.
// Such as pontificate in Conpherence
var form = e.getNode('tag:form');
- var r = JX.DOM.invoke(form, 'didSyntheticSubmit');
-
+ JX.DOM.invoke(form, 'didSyntheticSubmit');
});
}
diff --git a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
--- a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
+++ b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js
@@ -127,7 +127,7 @@
}
// Get all the text on the current line. If the line only contains
- // whitespace, don't actiavte: the user is probably typing code or a
+ // whitespace, don't activate: the user is probably typing code or a
// numbered list.
var line = area.value.substring(0, head - 1);
line = line.split('\n');
@@ -454,7 +454,7 @@
// If the user hasn't typed any text yet after typing the character
// which can summon the autocomplete, deactivate and let the keystroke
- // through. For example, We hit this when a line ends with an
+ // through. For example, we hit this when a line ends with an
// autocomplete character and the user is trying to type a newline.
if (range.start == this._cursorHead) {
this._deactivate();
@@ -529,9 +529,13 @@
}
}
+ // Deactivate immediately if the user types an ignored token like ":)",
+ // the smiley face emoticon. Note that we test against "text", not
+ // "trim", because the ignore list and suffix list can otherwise
+ // interact destructively.
var ignore = this._getIgnoreList();
for (ii = 0; ii < ignore.length; ii++) {
- if (trim.indexOf(ignore[ii]) === 0) {
+ if (text.indexOf(ignore[ii]) === 0) {
this._deactivate();
return;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 5:20 AM (15 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6986389
Default Alt Text
D17794.diff (2 KB)

Event Timeline