Show
Ignore:
Timestamp:
07/24/08 07:06:36 (16 months ago)
Author:
fumiakiy
Message:

Handle the result of regex.replace right to avoid empty images to be embedded. Thanks Makoto Tajima/M-logic for the bug report.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/EmoticonButton/mt-static/plugins/EmoticonButton/js/emoticon.js

    r644 r886  
    5050 
    5151    eventClick: function( event ) { 
    52         var name = event.target.id; 
    53         name = name.replace(/emoticon\-icon\-(\w+)/, '$1'); 
    54         if (!name) 
     52        var id = event.target.id; 
     53        var name = id.replace(/emoticon\-icon\-(\w+)/, '$1'); 
     54        if (!name || ( name == id )) 
    5555            return; 
    5656        var ancestor = DOM.getFirstAncestorByClassName( event.target, "emoticon-icon", true );