Defect #12650

Lost text after selection in issue list with IE

Added by Daniel Felix almost 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:2.3.1
Resolution:Fixed Affected version:2.3.0

Description

Hi there,

I just encountered some wired behaviour which is reproducible in nearly every redmine installation.

I tried this with Internet Explorer 9.0.8.

You can mark some text on the roadmap list, which instantly disappear after selection.

I attached two screenshots, to illustrate it. These screenshots are taken from redmine.org.

Maybe this is related to the context menu js.

Best regards,
Daniel

Before.png - before selection (155 KB) Daniel Felix, 2012-12-19 16:32

Selected.png - during selection (151 KB) Daniel Felix, 2012-12-19 16:32

After.png - after mouse release (158 KB) Daniel Felix, 2012-12-19 16:32

context-menu.diff Magnifier (499 Bytes) Daniel Ritz, 2013-04-18 11:42


Related issues

Related to Redmine - Defect #12710: Ticket selection removes text Closed
Duplicated by Redmine - Defect #12951: Multi-lines select by control+clicking wipes out title te... Closed
Duplicated by Redmine - Defect #8783: Words selected from issue list disappeared Closed 2011-07-11

Associated revisions

Revision 11750
Added by Jean-Philippe Lang over 4 years ago

Fixed: Lost text after selection in issue list with IE (#12650).

Revision 11751
Added by Jean-Philippe Lang over 4 years ago

Merged r11750 from trunk (#12650).

History

#1 Updated by Daniel Felix almost 5 years ago

  • Subject changed from Strange behaviour of roadmap list to Lost text, after selection in roadmap list

#2 Updated by Daniel Felix over 4 years ago

  • Target version set to 2.3.1

Another JS related issue.
Maybe this could be solved by upgrading to newer libraries? Can someone confirm this on its own Redmine?

Maybe this could find its way in the next bug fix release as this is sometime a little bit annoying. ;-)

#3 Updated by Ivan Cenov over 4 years ago

I cannot reproduce.
Redmine 2.2.3
Firefox 19.0.2
Windows 7

#4 Updated by Daniel Felix over 4 years ago

Yes, as mentioned above is this a IE related issue. ;-)
WebKit and gecko engines won't have this problem.

#5 Updated by Daniel Felix over 4 years ago

By the way, I haven't checked it on ie 10. Will give it a try when I'm home.

#6 Updated by Ivan Cenov over 4 years ago

IE 9.0.14 has this problem

#7 Updated by Daniel Felix over 4 years ago

I rechecked it now on IE 10. This occurs there too. So this is not a Problem of outdated Browsers like IE6, 7 & 8. It's a problem of the next generation too.

#8 Updated by Daniel Felix over 4 years ago

  • Subject changed from Lost text, after selection in roadmap list to Lost text, after selection
  • Affected version (unused) changed from 2.1.4 to 2.3.0
  • Affected version changed from 2.1.4 to 2.3.0

I update this.
The text is lost in every list which uses this file: source:trunk/public/javascripts/context_menu.js

I debugged this. The text gets lost after a return in this file: source:trunk/public/javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js

It seems that this problem gets huger in the latest IE version. If I ctrl+click to multiselect issues, all text of the selected items get lost.

Maybe an upgrade of jquery and jqueryui would solve this problem. This bug makes the multiselection in Internet Explorer not really useful.

#9 Updated by Jongwook Choi over 4 years ago

Lower versions of Redmine (e.g. 2.0.x and 2.1.x) are also affected, too.

#10 Updated by Daniel Felix over 4 years ago

Jongwook Choi wrote:

Lower versions of Redmine (e.g. 2.0.x and 2.1.x) are also affected, too.

Thanks for the hint. I know this, I've set it initially to 2.1.4, but changed it to the most recent version as this still occurs there. :-)
Otherwise this one would maybe get lower priority as we thing this one is outdated. ;-)

#11 Updated by Daniel Ritz over 4 years ago

Daniel Felix wrote:

I update this.
The text is lost in every list which uses this file: source:trunk/public/javascripts/context_menu.js

yes, that one is the problem. And this one causes it:

function contextMenuClearDocumentSelection() {
  // TODO
  if (document.selection) {
    document.selection.clear(); // IE
  } else {
    window.getSelection().removeAllRanges();
  }
}

The document.selection.clear() causes the selected text to disappear. According to doc from M$:
http://msdn.microsoft.com/en-us/library/ie/ms535869%28v=vs.85%29.aspx
the clear deletes the content of the selection. Replacing it with .empty() seems to do the trick.

I don't claim to understand what the purpose of this function is. Why? Removing the line in question completely seems no to have any negative effect...

#12 Updated by Jean-Philippe Lang over 4 years ago

  • Subject changed from Lost text, after selection to Lost text after selection in issue list with IE
  • Status changed from New to Closed
  • Resolution set to Fixed

I confirmed that using .empty() fixed the issue, thanks. Committed in r11750.
The purpose of this line is to avoid the text selection to appear when selecting multiple issues at once with the shift key pressed.

#13 Updated by Toshi MARUYAMA over 3 years ago

#14 Updated by Go MAEDA over 2 years ago

  • Duplicated by Defect #8783: Words selected from issue list disappeared added

Also available in: Atom PDF