steveathon / bootstrap-wysiwyg

Tiny bootstrap-compatible WYSIWYG rich text editor
MIT License
661 stars 1.71k forks source link

createLink not working in Firefox 42 on Mac OS 10.11.1 #74

Closed tbhockey closed 8 years ago

tbhockey commented 8 years ago

The example createLink code, while working correctly in all other browsers I've tested, does nothing in Firefox 42.

<div class="btn-group">
    <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title="Hyperlink"><i class="fa fa-link"></i></a>
    <div class="dropdown-menu input-append">
        <input placeholder="URL" type="text" data-edit="createLink" />
        <button class="btn" type="button">Add</button>
    </div>
</div>

In FF, the toolbar closes upon clicking the "Add" button, but the value of the input doesn't go anywhere. Anyone else run into this? I was actually developing in FF and couldn't get this "working" for hours, then realized that it had been working all along in other browsers.

codewithtyler commented 8 years ago

That's odd that you only have this issue with Firefox. When I originally found this bug it was happening in all browsers. If you'll look at the example html files you'll see the following JavaScript is added to each example:

$(".dropdown-menu > input").click(function (e) {
    e.stopPropagation();
});

This fixes the issue you mentioned.

tbhockey commented 8 years ago

Hi @RandomlyKnighted , thanks for the response. I had actually implemented that JS already and it doesn't seem to make any difference; at least not in FF 42, which is the only one I have access to at the moment.

codewithtyler commented 8 years ago

Alright, I'll check it out again this afternoon. Firefox made have changed something in one of their last updates.

tbhockey commented 8 years ago

Thanks @RandomlyKnighted . FYI I was just able to run some testing in other versions. Had the same problem down to FF 41. At FF 38 and below it works perfectly fine. I'll see if I can figure out the exact version where it breaks.

tbhockey commented 8 years ago

Ah... please ignore that ^ comment. Not working for me in any FF version actually...

tbhockey commented 8 years ago

I know this project has been modified from the MindMup one, but I have the exact same problem in FF on their example at: http://mindmup.github.io/bootstrap-wysiwyg/

codewithtyler commented 8 years ago

That's odd I just tested using that link and I had no issues. I tested it using Firefox 42.

Just to be clar when you type in http://www.google.com in the textbox and click Add it does not turn the word that you highlighted blue?

tbhockey commented 8 years ago

That is correct. Here's a screen capture: https://dl.dropboxusercontent.com/u/1224683/ff.mov

codewithtyler commented 8 years ago

In that video you didn't highlight any text first. So it doesn't have anywhere to put the link. Try highlighting the word ahead and then use the createLink button. It works just like the createLink button in Microsoft Outlook. The word has to be highlighted (or selected) in order to add the link to it.

tbhockey commented 8 years ago

DOH! :anguished: I had no idea that was how it is designed to work! Yes, it works perfectly fine like that. In every other browser you can just create at link w/o highlighting any other text, which is what led me to believe that's how it works. Well thank you so much for clarifying!

codewithtyler commented 8 years ago

No problem. If you could please close this issue. Feel free to reopen it later if you have any future problems with this issue.