User "Brion VIBBER" posted a comment on MediaWiki.r100391. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100391#c24801 Commit summary:
QUnit test cases for bug 31847: will trigger a fail on IE 6/7/8 jquery.textSelection's getCaretPosition() gives bogus results on IE 6/7/8 when there's not a selection set in the textarea; it seems to give us some value somewhere in the middle of the textarea, rather than what we expected. If we actually set an empty selection, then it gets it back just fine! But if the cursor is in initial state, or has been moved by the user, we get back garbage. This is causing WikiEditor to sometimes insert things in the wrong place, as it tries to pull the caret position and manipulate the selection to do insertions; we then end up using the bogus selection when it gets saved in via selection restoration. Comment: Bah! Looks like the initial state starts at the end of the textarea on some browsers.... Firefox switched from end to beginning in Firefox 6. Would be nice if we were testing current versions in TestSwarm too. :) Opera seems to be defaulting to end all the way through current 11.52. What I really *want* to test is the state after somebody clicks in the field, but I don't quite know how to automate it. :P Probably ok to get a result here that's either at start or at end, as long as it's not a random spot in the middle. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
