Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

19 rindas
537 B

  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @format
  8. * @flow strict
  9. * @emails oncall+draft_js
  10. */
  11. 'use strict';
  12. const Keys = require("fbjs/lib/Keys");
  13. function isSoftNewlineEvent(e: SyntheticKeyboardEvent<>): boolean {
  14. return e.which === Keys.RETURN && (e.getModifierState('Shift') || e.getModifierState('Alt') || e.getModifierState('Control'));
  15. }
  16. module.exports = isSoftNewlineEvent;