Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with tinyMce & selectBoxIt #53

Closed
eMongo opened this issue Nov 17, 2012 · 13 comments
Closed

Problem with tinyMce & selectBoxIt #53

eMongo opened this issue Nov 17, 2012 · 13 comments
Assignees
Labels

Comments

@eMongo
Copy link

eMongo commented Nov 17, 2012

Hi,

First of ALL .. this SelectBoxIT is the BEST !!! i love it .. BUT ...

This is strange. Tried everything ... :/

  1. Put a Tinymce editor on page .. write som content in the editor. fx. ("test this is content")
  2. selectBoxIT on page with fx. 3 options. ("option1", "option2", "option3")

Problem .. when i choose option 2 or 3 and then choose option 1, the option text changes to the content of the tinyMce editor ("test this is content").

So now i have a selectBoxIt with following options ("test this is content", "option2", "option3")

PLEASE HELP !! :) :) :)

@tvdeyen
Copy link
Contributor

tvdeyen commented Nov 17, 2012

Very strange. I use tinymce and selectboxit together in many projects and do not have such problems.

Can you please provide your tinymce config and some more info about how you use them in your dom? Element ids, classes, etc.

Thanks

Thomas

@eMongo
Copy link
Author

eMongo commented Nov 17, 2012

Hi again .. thx for fast reply ..

Made an example here

http://flueknepperen.dk/test.htm

@eMongo
Copy link
Author

eMongo commented Nov 17, 2012

Or .. http://jsfiddle.net/eMongo/2nXsw/

:)

@tvdeyen
Copy link
Contributor

tvdeyen commented Nov 17, 2012

Can't see any strange behavior and can't reproduce your error in both examples. Using an iPhone with iOS6.

What browser are you using?

@eMongo
Copy link
Author

eMongo commented Nov 17, 2012

Hi again,

Does not work in every browser i try .. IE, Chrome, Firefox, Opera http://jsfiddle.net/eMongo/2nXsw/

This is the hurdle ..

  1. change from option 1 to option 2.
  2. change from option 2 to option 1.

Tadaa .. option 1 text now has the value "Say WHAT?"

Can you replikate the error ?

:)

@eMongo
Copy link
Author

eMongo commented Nov 17, 2012

i just tried it on ipad ios6 and iphone ios6 .. there it works, but not in every other normal browsers ... :)
Its quite funny what the output does ... :)

Any comments =) ?

@tvdeyen
Copy link
Contributor

tvdeyen commented Nov 17, 2012

I can reproduce it in Chrome.

Very strange indeed. Only the value display is changed. The actual value in the list stays the same.

Maybe @gfranko knows what could cause this error?

@eMongo
Copy link
Author

eMongo commented Nov 17, 2012

Hope so :/ :)

@ghost ghost assigned gfranko Nov 17, 2012
@gfranko
Copy link
Owner

gfranko commented Nov 17, 2012

@eMongo I just updated SelectBoxIt with a fix for your issue... the scary part is that I am not 100% sure why it was happening.

@tvdeyen When a new drop down option was selected, SelectBoxIt found the currently selected drop down option text by finding the current list item (li) text. This was not the most specific selector, since an anchor tag is also a child element of each list item element (and contains the text). So all I did was find the current text by adding a find("a") jQuery selector to it. This seemed to fix the issue, but I'm curious of your take on it...

The line is 1145 of jquery.selectBoxIt.core.js

@eMongo
Copy link
Author

eMongo commented Nov 17, 2012

Hi Greg,

It works, wow thank you, I appreciate your work, we need more of your kind out there :) :) :) I have spent the whole day to find out what was wrong ... thank you again

Michael

@gfranko
Copy link
Owner

gfranko commented Nov 17, 2012

@eMongo Thanks for the kind words. Let me know if you have any more issues!

@tvdeyen
Copy link
Contributor

tvdeyen commented Nov 17, 2012

I also can't say why this happens, but finding the 'a' and ask it for it's text sounds legit and is even more correct, since every li has an a in it.

@tvdeyen
Copy link
Contributor

tvdeyen commented Nov 17, 2012

That's why open source does pay you for your hard work. <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants