Changeset 35563 in webkit


Ignore:
Timestamp:
Aug 5, 2008 9:47:34 AM (16 years ago)
Author:
timothy@apple.com
Message:

Makes the selection surround just the name or value that was
double clicked when editing CSS properties. This regressed when
the Inspector started using focus/blur events, since a focus on
a content editable region changes the selection.

https://bugs.webkit.org/show_bug.cgi?id=20280

Reviewed by Adam Roben.

  • page/inspector/StylesSidebarPane.js: (WebInspector.StylePropertyTreeElement.prototype.startEditing): Change the selection after calling WebInspector.startEditing, since WebInspector.startEditing will set an initial selection due to a focus event.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r35562 r35563  
     12008-08-04  Timothy Hatcher  <timothy@apple.com>
     2
     3        Makes the selection surround just the name or value that was
     4        double clicked when editing CSS properties. This regressed when
     5        the Inspector started using focus/blur events, since a focus on
     6        a content editable region changes the selection.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=20280
     9
     10        Reviewed by Adam Roben.
     11
     12        * page/inspector/StylesSidebarPane.js:
     13        (WebInspector.StylePropertyTreeElement.prototype.startEditing):
     14        Change the selection after calling WebInspector.startEditing,
     15        since WebInspector.startEditing will set an initial selection
     16        due to a focus event.
     17
    1182008-08-04  Timothy Hatcher  <timothy@apple.com>
    219
  • trunk/WebCore/page/inspector/StylesSidebarPane.js

    r35561 r35563  
    688688            selectElement = this.listItemElement;
    689689
     690        this.listItemElement.handleKeyEvent = this.editingKeyDown.bind(this);
     691
     692        WebInspector.startEditing(this.listItemElement, this.editingCommitted.bind(this), this.editingCancelled.bind(this), context);
    690693        window.getSelection().setBaseAndExtent(selectElement, 0, selectElement, 1);
    691 
    692         this.listItemElement.handleKeyEvent = this.editingKeyDown.bind(this);
    693 
    694         WebInspector.startEditing(this.listItemElement, this.editingCommitted.bind(this), this.editingCancelled.bind(this), context);
    695694    },
    696695
Note: See TracChangeset for help on using the changeset viewer.