Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14643531
D17794.id42788.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D17794.id42788.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 8:22 AM (18 h, 37 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6986389
Default Alt Text
D17794.id42788.diff (2 KB)
Attached To
Mode
D17794: Fix autocomplete/send-on-enter interactions
Attached
Detach File
Event Timeline
Log In to Comment