Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

[Bug] Weird behavior after click on color picker dropdown inside iframe #157

Closed
ducdhm opened this issue Apr 4, 2016 · 7 comments
Closed

Comments

@ducdhm
Copy link

ducdhm commented Apr 4, 2016

  • Link JSFiddle: http://jsfiddle.net/bobkhin/69t2tov1/
  • Context:
    • I have an input inside an iframe.
    • I initialized colorpicker for this input.
    • After that, I clicked input for showing color picker dropdown for choosing a color
    • I click on outside of iframe, the color becomes to black
  • Expected behaviour: Selected color is kept
  • Actual behaviour: Selector color changed to black
@itsjavi
Copy link
Owner

itsjavi commented Apr 7, 2016

JSFiddle adds your code into a iframe. Then you are creating another iframe inside that one. Maybe that's the problem. The mousemove events seems to get crazy and only clicked is allowed.

It seems a cross-domain issue : http://stackoverflow.com/questions/5261328/receive-mousemove-events-from-iframe-too

@ducdhm
Copy link
Author

ducdhm commented Apr 7, 2016

@mjolnic I have a page (it's in my local) which I create an iframe and initialize color picker inside this iframe. I also get the same problem. It's not cause of iframe inside iframe.

@itsjavi
Copy link
Owner

itsjavi commented Apr 7, 2016

@ducdhm Can you check again with latest version 2.3.3 ? It seems that the black color issue is not happening anymore, at least on the Fiddle.

@ducdhm
Copy link
Author

ducdhm commented Apr 8, 2016

@mjolnic I have tested with lastest version 2.3.3 and seems like it's not fixed. Maybe I'll find other solution for my project.

@itsjavi
Copy link
Owner

itsjavi commented Apr 8, 2016

There might be something in your code that produces that, the issue cannot be reproduced in JSFiddle with the code you provided.

Anyway, if you find a solution and/or the cause of your problem could you post it here? thanks

@itsjavi itsjavi added the incomplete Incomplete issue. Some information might be missing. label Apr 18, 2016
@bkavuncu
Copy link

bkavuncu commented Jun 9, 2016

I experience this problem too, For example, I have an iframe on the right bottom corner of the page. I create my colorpicker inside an element in this iframe. The moment I move my mouse outside the iframe, the parent page acts like a giant colorpicker, where moving mouse around actually changes color of the colorpicker inside the iframe, even when the color picker is disabled.

@agupta1989
Copy link

I faced the similar issue in my case as well. and I believe this issue is because of context in which color picker is executing. may be we need to provide some externalization of the default context. by default it should run within window or if provided it should take iframe.window.

That is one thing, another thing is, as @ducdhm said, clicking outside of iframe still firing colorChange events repeatedly.

@itsjavi itsjavi removed the incomplete Incomplete issue. Some information might be missing. label Jul 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants