본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

A page element is not copied

  • 5 답장
  • 2 이 문제를 만남
  • 1 보기
  • 최종 답변자: dopadapo

more options

Halo, Firefox Users.

Firefox 22.0 on Windows7.

I have seen this issue for such a long time. Is this a bug ?

Please, visit this site by using Firefox.

http://answers.microsoft.com/en-us/office/forum/office_2010-onenote/onenote-linked-notes-window-is-docking-on-top-of/6631da0a-447b-437d-b2fa-efe99c919870

Please, do right-click and select "Select All", then right-click and select "Copy".

Paste the copied elements as plain-text onto any text editor.


I see that all dates are not copied. In the text that I paste, I see:

"… asked on ..." (no date)

"… replied on ..." (no date)


If I use MS-InternetExplorer, the pasted text has:

"… asked on

July 15, 2010 ..."


"… replied on

September 4, 2010 ..."

… and so on.

Thank you.

Halo, Firefox Users. Firefox 22.0 on Windows7. I have seen this issue for such a long time. Is this a bug ? Please, visit this site by using Firefox. http://answers.microsoft.com/en-us/office/forum/office_2010-onenote/onenote-linked-notes-window-is-docking-on-top-of/6631da0a-447b-437d-b2fa-efe99c919870 Please, do right-click and select "Select All", then right-click and select "Copy". Paste the copied elements as plain-text onto any text editor. I see that all dates are not copied. In the text that I paste, I see: "… asked on ..." (no date) "… replied on ..." (no date) If I use MS-InternetExplorer, the pasted text has: "… asked on July 15, 2010 ..." "… replied on September 4, 2010 ..." … and so on. Thank you.

글쓴이 dopadapo 수정일시

선택된 해결법

Hello, it's an unusual layout. The username is the display text of a link, but the date is the text of a button, although it is styled just like the username so this difference is not obvious:

<a href="http://answers.microsoft.com/en-us/profile/b7195fc2-0525-4652-973a-02ce0e415bf6">shadow49</a>
asked on
<div>
 <button>July 15, 2010</button>

Why doesn't Firefox include the text of buttons in its "plain text"? I don't know...


As a temporary workaround, you could convert the buttons to plain text using a snippet of script. Here's how:

(1) On the page, open the web console by pressing Ctrl+Shift+k

(2) Paste the following long line of code next to the caret (">") and press Enter to run it:

while(document.getElementsByTagName("button").length > 0){ but = document.getElementsByTagName("button")[0]; var txt = but.textContent; if(txt){ if(txt.length>0) but.parentNode.replaceChild(document.createTextNode(txt), but); else but.parentNode.removeChild(but);} else but.parentNode.removeChild(but);}

(3) Close the web console by pressing Ctrl+Shift+k


That isn't very convenient, but it could be automated a bit by creating a bookmarklet. Here's how.

First, copy this slightly modified script (select, Ctrl+c):

javascript: while(document.getElementsByTagName("button").length > 0){ but = document.getElementsByTagName("button")[0]; var txt = but.textContent; if(txt){ if(txt.length>0) but.parentNode.replaceChild(document.createTextNode(txt), but); else but.parentNode.removeChild(but);} else but.parentNode.removeChild(but);} void 0;

Next, if you are not displaying the Bookmarks Toolbar, you can display it using either:

  • right-click a blank area of the tab bar > Bookmarks Toolbar
  • tap the Alt key > View menu > Toolbars > Bookmarks Toolbar

Right-click on the Bookmarks Toolbar and choose New Bookmark.

Paste the code into the Location box (the second box).

Then type a useful name in the Name box (e.g., Btn2Txt) and click Add.

Now, when you want to hack the buttons in the page, click the bookmark to run the script.

문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (5)

more options

happens to me too maybe it is a bug? you can file one at bugzilla

more options

선택된 해결법

Hello, it's an unusual layout. The username is the display text of a link, but the date is the text of a button, although it is styled just like the username so this difference is not obvious:

<a href="http://answers.microsoft.com/en-us/profile/b7195fc2-0525-4652-973a-02ce0e415bf6">shadow49</a>
asked on
<div>
 <button>July 15, 2010</button>

Why doesn't Firefox include the text of buttons in its "plain text"? I don't know...


As a temporary workaround, you could convert the buttons to plain text using a snippet of script. Here's how:

(1) On the page, open the web console by pressing Ctrl+Shift+k

(2) Paste the following long line of code next to the caret (">") and press Enter to run it:

while(document.getElementsByTagName("button").length > 0){ but = document.getElementsByTagName("button")[0]; var txt = but.textContent; if(txt){ if(txt.length>0) but.parentNode.replaceChild(document.createTextNode(txt), but); else but.parentNode.removeChild(but);} else but.parentNode.removeChild(but);}

(3) Close the web console by pressing Ctrl+Shift+k


That isn't very convenient, but it could be automated a bit by creating a bookmarklet. Here's how.

First, copy this slightly modified script (select, Ctrl+c):

javascript: while(document.getElementsByTagName("button").length > 0){ but = document.getElementsByTagName("button")[0]; var txt = but.textContent; if(txt){ if(txt.length>0) but.parentNode.replaceChild(document.createTextNode(txt), but); else but.parentNode.removeChild(but);} else but.parentNode.removeChild(but);} void 0;

Next, if you are not displaying the Bookmarks Toolbar, you can display it using either:

  • right-click a blank area of the tab bar > Bookmarks Toolbar
  • tap the Alt key > View menu > Toolbars > Bookmarks Toolbar

Right-click on the Bookmarks Toolbar and choose New Bookmark.

Paste the code into the Location box (the second box).

Then type a useful name in the Name box (e.g., Btn2Txt) and click Add.

Now, when you want to hack the buttons in the page, click the bookmark to run the script.

more options

Thanks for the replies, Waka_Flocka_Flame and jscher2000.

jscher2000, the script works.

Is it possible to make the script also "select all" page elements and "copy" them after converting the buttons to plain text ?

Well, I am pushing my luck here. :) It would be nicer if I can click the script once and it does 3 commands sequently. I do not know about javascript.

Thanks.

more options

In Firefox, scripts are restricted in how they interact with the clipboard, so I don't think I can add that last step...

To select the entire document body, you can use this (it would go before the void 0 at the end):

var sel=window.getSelection(); sel.selectAllChildren(document.body);

At that point, you could press Ctrl+c or right-click > Copy. Does it work?

more options

Thanks again, jscher2000.

Based on your explanation, I think the first script is already helpful enough for me now. Select All and Copy are easy for me to do manually.

I thought someone had reported this issue to Firefox team but then I found out that this issue was still there in latest version of FF. I remember that two FF add-ins for sending html contents to MS-OneNote face this issue too and one of the developers had seen it. I also have sent feedback to FF team.

Thank you so much for your replies and for the script.

-=-