Skip to content

Commit

Permalink
Isolate zero-width spaces in <span>s.
Browse files Browse the repository at this point in the history
  • Loading branch information
int3 committed Jan 26, 2012
1 parent 1e04eb8 commit 10d7078
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vimiumFrontend.js
Expand Up @@ -973,8 +973,9 @@ function showFindModeHUDForQuery() {
* We need this so that the find mode HUD doesn't match its own searches.
*/
function insertSpaces(query) {
// &#8203; is a zero-width space
return query.split("").join("&#8203");
// &#8203; is a zero-width space. the <span>s are necessary because the zero-width space tends to interfere
// with subsequent characters in the same text node.
return query.split("").join("<span class='vimiumReset'>&#8203</span>");
}

function enterFindMode() {
Expand Down

0 comments on commit 10d7078

Please sign in to comment.