r24647 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24646‎ | r24647 | r24648 >
Date:09:17, 7 August 2007
Author:vyznev
Status:old
Tags:
Comment:
Prefer textContent over innerText to allow hidden sort keys to work on Safari.
No apparent regressions on Firefox 2.0, Konqueror 3.5.5 or Opera 9.21; not
actually tested on Safari nor IE yet(!).

See also: http://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#sortable_wikitables_and_Safari
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/wikibits.js
@@ -999,7 +999,8 @@
10001000 function ts_getInnerText(el) {
10011001 if (typeof el == "string") return el;
10021002 if (typeof el == "undefined") { return el };
1003 - if (el.innerText) return el.innerText; // Not needed but it is faster
 1003+ if (el.textContent) return el.textContent; // not needed but it is faster
 1004+ if (el.innerText) return el.innerText; // IE doesn't have textContent
10041005 var str = "";
10051006
10061007 var cs = el.childNodes;
@@ -1332,4 +1333,4 @@
13331334 //note: all skins should call runOnloadHook() at the end of html output,
13341335 // so the below should be redundant. It's there just in case.
13351336 hookEvent("load", runOnloadHook);
1336 -hookEvent("load", mwSetupToolbar);
\ No newline at end of file
 1337+hookEvent("load", mwSetupToolbar);
Index: trunk/phase3/RELEASE-NOTES
@@ -366,6 +366,8 @@
367367 * Fixed a display problem in the E-mail part of the preferences page when
368368 the E-mail is not confirmed: the notice about it was in the same line as
369369 a preference.
 370+* Table sorting JavaScript prefers textContent over innerText to allow hidden
 371+ sort keys to work on Safari
370372
371373 == API changes since 1.10 ==
372374

Follow-up revisions

RevisionCommit summaryAuthorDate
r24705Merged revisions 24632-24693 via svnmerge from...david19:15, 9 August 2007

Status & tagging log