arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.54k stars 271 forks source link

Command completion does not trigger onContentDidChange #81

Closed dangcuuson closed 5 years ago

dangcuuson commented 6 years ago

Description

In command mode, after pressing tab/space/enter to finish insertion, the onContentDidChange as well as onContentWillChange callbacks were not invoked

Steps to Reproduce

  1. The following code are created based on the basic example
    
    <html>
    <header>
    <link rel="stylesheet" href="./mathlive/mathlive.core.css">
    <link rel="stylesheet" href="./mathlive/mathlive.css">
    </header>
Input:
f(x)=
Output (onContentDidChange):


2. Type '\\' to enter command mode
3. Insert any command (e.g: sin)

### Actual behavior
The output element does not get updated with the new inserted command

### Expected Behavior 
The output element should be updated with the new inserted command
arnog commented 5 years ago

Fixed now.