title: Draft.js inline style not working without text selection
body: <p>I have the following React component that uses Draft.js:</p>
  
  <pre><code>class Create extends React.Component&lt;{}, CreateState&gt;{
  
  constructor(props: Readonly&lt;{}&gt;) {
      super(props);
      this.state = {
          short: "",
          title: "",
          editorState: EditorState.createEmpty()
      }
  }
  
  private handleTitleChange = (e: any) =&gt; this.setState({
      title: e.target.value
  })
  
  private handleShortChange = (e: any) =&gt; this.setState({
      short: e.target.value
  })
  
  private handleEditorChange = (e: EditorState) =&gt; {
      this.setState({
          editorState: e
      })
  }
  
  /**
   * Toggle the current inline style of the editor based on the butons pressed in the toolbar
   */
  
  private toggleInlineStyle = (style: InlineStyles, e: any) =&gt; {
      e.preventDefault();
      switch (style) {
          case InlineStyles.BOLD: this.handleEditorChange(RichUtils.toggleInlineStyle(this.state.editorState, "BOLD")); break;
          case InlineStyles.ITALIC: this.handleEditorChange(RichUtils.toggleInlineStyle(this.state.editorState, "ITALIC")); break;
          case InlineStyles.UNDERLINE: this.handleEditorChange(RichUtils.toggleInlineStyle(this.state.editorState, "UNDERLINE")); break;
          case InlineStyles.STRIKE: this.handleEditorChange(RichUtils.toggleInlineStyle(this.state.editorState, "STRIKETHROUGH")); break;
          default: break;
      }
  }
  
  
  render() {
      return (
          &lt;main id="create-main"&gt;
              &lt;form id="create-form"&gt;
  
                  &lt;TextField className="create-form-title" label="Titlu" value={this.state.title}
                      onChange={this.handleTitleChange} /&gt;
                  &lt;TextField textarea className="create-form-short" characterCount maxLength={160} label="Varianta scurtă a articolului"
                      onChange={this.handleShortChange} value={this.state.short} /&gt;
                  &lt;Button className="create-form-post-button" label="Postează"&gt;&lt;/Button&gt;
              &lt;/form&gt;
              &lt;section id="create-form-editor-container"&gt;
                  &lt;div id="create-form-toolbar"&gt;
  
                      &lt;span className="create-form-toolbar-button" onClick={(e) =&gt; this.toggleInlineStyle(InlineStyles.BOLD,e)}&gt;
                          &lt;img src={bold} alt="bold"&gt;&lt;/img&gt;
                      &lt;/span&gt;
                      &lt;span className="create-form-toolbar-button" onClick={(e) =&gt; this.toggleInlineStyle(InlineStyles.ITALIC,e)}&gt;
                          &lt;img src={italic} alt="italic"&gt;&lt;/img&gt;
                      &lt;/span&gt;
                      &lt;span className="create-form-toolbar-button" onClick={(e) =&gt; this.toggleInlineStyle(InlineStyles.UNDERLINE,e)}&gt;
                          &lt;img src={underline} alt="underline"&gt;&lt;/img&gt;
                      &lt;/span&gt;
                      &lt;span className="create-form-toolbar-button" onClick={(e) =&gt; this.toggleInlineStyle(InlineStyles.STRIKE,e)}&gt;
                          &lt;img src={strikethrough} alt="strikethrough"&gt;&lt;/img&gt;
                      &lt;/span&gt;
                      &lt;div className="create-form-toolbar-spacer" /&gt;
  
                      &lt;span className="create-form-toolbar-button"&gt;
                          &lt;img src={size} alt="size"&gt;&lt;/img&gt;
                      &lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div id="create-form-draft-container"&gt;
                      &lt;Editor editorState={this.state.editorState} onChange={this.handleEditorChange} /&gt;
                  &lt;/div&gt;
              &lt;/section&gt;
          &lt;/main&gt;
      )
  }
  </code></pre>
  
  <p>}</p>
  
  <p>To toggle inline styles in the <code>Editor</code> I have some buttons for bold, italic,etc. When I select some text in the editor and I press one of those buttons, everything works as expected. <code>toggleInlineStyle</code> gets called and the appropriate style gets applied. </p>
  
  <p>The problem is that when there is no text selected and I press any button, the handler gets called, but no style is applied, which is not the intended behavior. What should I do to fix this? </p>
  
  <p>Thanks in advance!</p>