julianshapiro/blast

DOM.normalize() not working properly in IE

Opened this issue · 0 comments

On Line 419, thisParentNode.normalize(); is called in order to combine and clean up all child nodes. On certain versions/certain settings in IE, the normalize(); function does not work correctly. It does not combine the child nodes, which in turn leads to faulty results.

For example:

  1. Searching for "pm" in cs.pmaj@test.com
  2. The child nodes could be "cs.p", "maj@test.com".
  3. blast.js will search for "pm" in "cs.p"
  4. blast.js will search for "pm" in ""maj@test.com"

Both will return no matches. The correct functionality should be:

  1. Searching for "pm" in "cs.pmaj@test.com"
  2. The child nodes should just be "cs.pmaj@test.com".
  3. blast.js will search for "pm" in "cs.pmaj@test.com"
    A match is found.

I know this is mostly a bug in IE, but maybe changing the code to not use this function, and instead doing it manually might be the better choice. Another solution might be to combine all child nodes into one, before searching through them. Although this is not necessary a bug with blast, it does affect it.

Here is more information: http://stackoverflow.com/questions/12972090/ie-9-standards-mode-normalize-method-does-not-work