ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 11292


Ignore:
Timestamp:
Apr 14, 2009, 2:34:07 PM (11 years ago)
Author:
fukamachi
Message:

#2328 IEで日記作成する際、アルバム小窓がカーソル位置に挿入してくれないバグを修正

Location:
OpenPNE/branches/work/fukamachi/pne_decoration
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/fukamachi/pne_decoration/pne_decoration.js

    r11284 r11292  
    2020table.style.display='none';Event.stopObserving(document,'mousedown',pne_mce_hide_color_table);}
    2121function pne_insert_str_to_selection(elm,str)
    22 {var selection;elm.focus();if(undefined!==window.execScript){selection=document.selection.createRange();selection.expand("character");selection.text=str+selection.text;}else{selection=new Selection(elm);var pos=selection.create();var head=elm.value.substring(0,pos.start);var tail=elm.value.substring(pos.end,elm.value.length);elm.value=head+str+tail;}}
     22{var selection;elm.focus();if(undefined!==window.execScript){selection=window.opener.document.selection.createRange();selection.expand("character");if(selection.text===""){selection.text=str+selection.text+"\n";}else{selection.text=str+selection.text;}}else{selection=new Selection(elm);var pos=selection.create();var head=elm.value.substring(0,pos.start);var tail=elm.value.substring(pos.end,elm.value.length);elm.value=head+str+tail;}}
  • OpenPNE/branches/work/fukamachi/pne_decoration/pne_decoration.js.src

    r11286 r11292  
    183183    elm.focus();
    184184    if (undefined !== window.execScript) {
    185         selection = document.selection.createRange();
     185        selection = window.opener.document.selection.createRange();
    186186        selection.expand("character");
    187         selection.text = str + selection.text;
     187        if (selection.text === "") {
     188            selection.text = str + selection.text + "\n";
     189        } else {
     190            selection.text = str + selection.text;
     191        }
    188192    } else {
    189193        selection = new Selection(elm);
     
    195199    }
    196200}
    197 
Note: See TracChangeset for help on using the changeset viewer.