mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
4a84954957
Summary: Fixes T12138. Test for the presence of being in fullscreen mode, and disable send on enter if present. Side note, I'd love a first class "hasClass" type Javelin function. Test Plan: - Go to Conpherence - Type some smack, see it send on enter - Go fullscreen like a boss - Let the words flow - Close fullscreen, then send on enter. - (might be nice someday to add a "submit" button to fullscreen editor) Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12138 Differential Revision: https://secure.phabricator.com/D17590
25 lines
613 B
JavaScript
25 lines
613 B
JavaScript
/**
|
|
* @provides javelin-behavior-conpherence-pontificate
|
|
* @requires javelin-behavior
|
|
* javelin-dom
|
|
* javelin-util
|
|
* javelin-workflow
|
|
* javelin-stratcom
|
|
* conpherence-thread-manager
|
|
*/
|
|
|
|
JX.behavior('conpherence-pontificate', function() {
|
|
|
|
var _sendMessage = function(e) {
|
|
e.kill();
|
|
var form = e.getNode('tag:form');
|
|
var threadManager = JX.ConpherenceThreadManager.getInstance();
|
|
threadManager.sendMessage(form, {});
|
|
};
|
|
|
|
JX.Stratcom.listen(
|
|
['submit', 'didSyntheticSubmit'],
|
|
'conpherence-pontificate',
|
|
_sendMessage);
|
|
|
|
});
|