From 6a4b407cb07ef89c729a30d4fe648d8a3221ae12 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Wed, 4 May 2016 16:25:42 -0700 Subject: [PATCH] fix(composer): Properly setup editing action listeners on update - This prevented emoji selection via the popover from working on a new window because the plugin is loaded after the contenteditable sets up the action listeners, so we need to re set them on update --- internal_packages/composer/lib/composer-editor.jsx | 3 +-- src/components/contenteditable/contenteditable.cjsx | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal_packages/composer/lib/composer-editor.jsx b/internal_packages/composer/lib/composer-editor.jsx index 45b0be71e..248191ce8 100644 --- a/internal_packages/composer/lib/composer-editor.jsx +++ b/internal_packages/composer/lib/composer-editor.jsx @@ -1,5 +1,5 @@ import React, {Component, PropTypes} from 'react'; -import {ContenteditableExtension, ExtensionRegistry, DOMUtils} from 'nylas-exports'; +import {ExtensionRegistry, DOMUtils} from 'nylas-exports'; import {DropZone, ScrollRegion, Contenteditable} from 'nylas-component-kit'; /** @@ -297,7 +297,6 @@ class ComposerEditor extends Component { ); } - } ComposerEditor.containerRequired = false diff --git a/src/components/contenteditable/contenteditable.cjsx b/src/components/contenteditable/contenteditable.cjsx index 31ba3b2e0..d703e57d4 100644 --- a/src/components/contenteditable/contenteditable.cjsx +++ b/src/components/contenteditable/contenteditable.cjsx @@ -158,6 +158,7 @@ class Contenteditable extends React.Component @_restoreSelection() @_notifyOfSelectionRestoration() @_refreshServices() + @_setupEditingActionListeners() @_mutationObserver.disconnect() @_mutationObserver.observe(@_editableNode(), @_mutationConfig()) @setInnerState editableNode: @_editableNode()