• 
      

    Fix a couple issues with events when submitting an inlineEditor.

    Review Request #4101 — Created May 4, 2013 and submitted

    Information

    Djblets
    master

    Reviewers

    Fix a couple issues with events when submitting an inlineEditor.
    
    When submitting an inlineEditor that has not changed, the caller is left
    with either no idea that the editor was ever closed, or with misleading
    data, which can mess with things like edit counts.
    
    There are two cases where this occurs.
    
    The first case is the standard case where nothing is changed and the
    field is submitted. There's no callback that occurs letting the caller
    know that anything happened. We now reuse the cancel callback for this.
    
    The second case is when notifyUnchangedCompletion is true. The caller
    will get notified of the "completion" callback, and is passed the new
    value and the initial value. These will be the same when nothing has
    changed. However, even if something has changed, the initial value is still
    pointing to the new value, due to pulling from a bad variable when
    triggering this event.
    
    Both cases have been fixed.
    Tested with some changes I'm putting together in Review Board. The bug actually
    manifests in released versions. If you open and close the draft banner's description
    editor a couple times, the edit counts will be wrong.
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
        Ignored Files:
          djblets/media/js/jquery.gravy.js
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (39e8f16)