Closed GoogleCodeExporter closed 9 years ago
I can reproduce the issue when copying text from FF to Word.
Safari to Word works fine, so does FF to TextEdit.
Need a better solution!
Original comment by mathiasn...@gmail.com
on 29 Apr 2012 at 10:15
I can reproduce the issue when copying text from FF to Word.
Safari to Word works fine, so does FF to TextEdit.
Need a better solution!
Original comment by mathiasn...@gmail.com
on 29 Apr 2012 at 10:15
I can reproduce this on Windows 7 (64 bit) with Firefox 14 Beta, Chrome 19 and
Safari 5.1.7. Opera 11.64 works fine.
I inspected the raw clipboard data. Firefox, Chrome and Safari save the copied
text in HTML, Text, and Unicode Text format with a surrounding div/span with
the style attribute 'font-size: 0px'.
Opera only saves the copied text in Text and Unicode Text format and therefore
has no issues.
Original comment by andreas....@outlook.com
on 8 Jun 2012 at 9:57
This seems to be a side effect of a workaround for IE9.
From the oncopyHandler in Hyphenator.js:
//create a hidden shadow element
shadow = currDoc.createElement('div');
//Moving the element out of the screen doesn't work for IE9
(https://connect.microsoft.com/IE/feedback/details/663981/)
//shadow.style.overflow = 'hidden';
//shadow.style.position = 'absolute';
//shadow.style.top = '-5000px';
//shadow.style.height = '1px';
//doing this instead:
shadow.style.color = window.getComputedStyle ?
targetWindow.getComputedStyle(body, null).backgroundColor : '#FFFFFF';
shadow.style.fontSize = '0px';
body.appendChild(shadow);
A shadow element is created to put the text without hyphenation. The contents
of that element are then selected so it overrides what gets copied to the
clipboard. After that, the original selection is restored. The problem is that
the fontSize of the shadow element is set to 0px to avoid an out of the screen
positioning. I uncommented the original code to test it in a fresh install of
IE9 (on Win7 64 bits) and it worked fine, so maybe that workaround isn't
necessary (I removed it actually).
Also, IE has scrolling issues when copying text (with hyphenation). When
content is selected using javascript it will scroll to the position of that
content, and although the original selection is restored, the original scroll
position is not. It will even scroll content from within an element with
overflow set to hidden, depending on the selection (this one didn't happen on
IE9 but did on IE8). This is another issue altogether anyway, I guess.
Original comment by mariano....@gmail.com
on 14 Jul 2012 at 7:06
This issue is still present in the actual version of hyphenator. Is there any
fix coming in the near future?
btw: in word for mac it will show transparent and with a size of 1 (guess 0 is
not working in this word version).
Original comment by land...@gmail.com
on 5 Jun 2013 at 5:08
This cannot be solved in Hyphenator
Original comment by mathiasn...@gmail.com
on 25 Sep 2014 at 2:51
Original issue reported on code.google.com by
george.g...@okb.no
on 3 Feb 2012 at 4:03