[Webkit-unassigned] [Bug 76818] "Copy Video URL" on HTML5 YouTube moves the video

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 23 15:22:25 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=76818





--- Comment #4 from jni.viens at gmail.com  2012-01-23 15:22:24 PST ---
Oh wow, i think i have pinpointed the issue at hand.

Do the same as described above, but when the video goes halfway out of sight as on the screenshot, hold your mouse down on the text to copy and "re-select" it, as if you wanted to select the text that is hidden. The video will go back to normal afterwards.

It is kinda hard to explain, so here's a video : http://files.ddl-vision.com/youtube_short.ogg

I did a bit of code analysis and found out the following and i am noting it down so someone might be saved from reading closure-compiled code (yuk).

This is what the JS does once your click on the "copy video URL" link : 

1- find "div.video-container div.tml5-modal-panel"
2- change the class "hid" to "html5-modal-panel-clipboard-substitute" (this will make the modal dialog appear over the video)
3- try to copy text to clipboard
4- Change the value of the input box inside to the video URL ***
5- set focus on the input text
6- select() on input text

** This is where it goes off screen. If you must see what that looks like, here you go : 

zn = function (a, b, c) {
    var d = l;
    window.clipboardData && (d = window.clipboardData.setData(c, b));
    d || (a = a.Gf, Im(a, "html5-modal-panel-clipboard-substitute"), a.jf.value = b, a.jf.focus(), lh(u(a.Zm, a), 100))
};

The issue is on "a.jf.value = b" (a.jf = the input text, b = the text). 

Video goes out of sight on this call. 


Speculations ahead
-------------------
The text is too long to fit in the input box, i'm not sure if this is the problem.

I'm trying to do a reduction, will let you know if I get it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list