搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Changed selectiblity behavior

  • 4 回覆
  • 0 有這個問題
  • 22 次檢視
  • 最近回覆由 ftoewe

more options

I can no longer 'Select all' of a simple html table displayed in the browser. The header lines won't select no matter what I try. The browser only allows the body lines to be selected, and subsequently copyied.

Source:

Location Heat Setpoints Cool Setpoints
Zone BldgFlrRm Thermostat Day Night Weekend Day Night Weekend
Lobby First Floor Lobby Down 70 64 60 73 84 84
Lobby Second Floor Lobby Up 69 64 60 72 84 84
I can no longer 'Select all' of a simple html table displayed in the browser. The header lines won't select no matter what I try. The browser only allows the body lines to be selected, and subsequently copyied. Source: <table id="progTable" class="tablesorter" border="1" cellspacing="0" cellpadding="5"> <!-- ##### The Header Lines #####--> <thead> <tr> <th Colspan=3>Location</th> <th Colspan=3>Heat Setpoints</th> <th Colspan=3>Cool Setpoints</th> </tr> <tr> <th scope="col"> Zone </th> <th scope="col"> BldgFlrRm </th> <th scope="col"> Thermostat </th> <th scope="col"> Day </th> <th scope="col"> Night </th> <th scope="col"> Weekend </th> <th scope="col"> Day </th> <th scope="col"> Night </th> <th scope="col"> Weekend </th> </tr> </thead> <tbody> <!-- ##### The Detail Lines #####--> <tr> <td> Lobby </td> <td> First Floor </td> <td> Lobby Down </td> <td> 70 </td> <td> 64 </td> <td> 60 </td> <td> 73 </td> <td> 84 </td> <td> 84 </td> </tr> <tr> <td> Lobby </td> <td> Second Floor </td> <td> Lobby Up </td> <td> 69 </td> <td> 64 </td> <td> 60 </td> <td> 72 </td> <td> 84 </td> <td> 84 </td> </tr> <tr> </tbody> </table>

被選擇的解決方法

Tablesorter disables table header text selection by default:

cancelSelection Boolean true Indicates if tablesorter should disable selection of text in the table header (TH). Makes header behave more like a button.

從原來的回覆中察看解決方案 👍 2

所有回覆 (4)

more options

In partial response to my own request, the Firefox browser is now sensitive to the <thead> tag that is used by the jquery code tablesorter.js to distinguish header entries from detail entries in a sortable table. My table includes <thead> </thead> <tbody> </tbody> tags. Until recent this caused no selection issues. Now it does. Can that be fixed?

more options

選擇的解決方法

Tablesorter disables table header text selection by default:

cancelSelection Boolean true Indicates if tablesorter should disable selection of text in the table header (TH). Makes header behave more like a button.

more options

If you are the author of the website, you can adjust your code using the tip mentioned by zeroknight.

If you are an end user trying to work around this type of rule on a website you don't control, you could potentiall use an add-on or custom style rule. See:

https://www.reddit.com/r/firefox/comments/y76ndq/extension_which_will_let_me_selecthighlight_text/

more options

Hi zeroknight and jscher2000, Yes, it's my website, so I have control of the code. Thank you so very much for your help. Never guessed it would be a configuration option. Just as an FYI, it seems to have changed behavior on Firefox only recently as I've used the same code for a long time. The same code still works the same on Chrome, FWIW. Regardless, it now works again on Firefox with a very minor tweak. Cheers, Fred