Why doesn't IE7 copy
 blocks to the clipboard correctly?

后端 未结 7 1073
一生所求
一生所求 2021-02-03 19:20

We\'ve noticed that IE7 has an odd behavor with code blocks posted on Stack Overflow. For example, this little code block:

public PageSizer(string href, int inde         


        
7条回答
  •  悲&欢浪女
    2021-02-03 20:15

    bad news : none of the proposed fixes work. Modifying prettify.js around line 1000

    html.push(htmlChunk.replace(newlineRe, '\n'));
    

    This causes double-spacing in other browsers, and still doesn't solve the IE7 copy to notepad problem! So even if I selectively detected IE7, this "fix" doesn't fix anything.

    I guess maybe it is simply a bug in IE7 having to do with JavaScript rebuilding a

     element -- no matter how many \n newlines I put in there, nothing changes w/r/t to the paste to notepad behavior.

提交回复
热议问题