nclud/verbatim

unwrapping, why?

Closed this issue · 8 comments

this line
$('.' + settings.selectedClass).contents().unwrap();
does remove the parent of the selected text, upon deselection the parent is not reinstated causing html/css issues . I have just disabled it, the plugin seems to work just fine, what's the purpose of it?

Whinch browser are you using?

chrome, but on firefox is the same

Do you have a repo or website I can look at to reproduce?
On Feb 6, 2015 11:08 AM, "natostanco" notifications@github.com wrote:

chrome, but on firefox is the same


Reply to this email directly or view it on GitHub
#3 (comment).

I tried it on localhost clean wp install

To answer your question, the unwrapping is necessary to remove the wrapping span element that is created around the selected text. If you make a new selection, this line of code unwraps the previous selection allowing for a new selection to be made.

The only issue I can think of is if you are trying to select content across different DOM types. For example, sometimes there is an issue when you make a selection across a heading tag and a p tag.

Without a live site or at least access to a repo of the site you are referencing, it's pretty hard for me to debug this any farther. Any more information you have would be useful.

closed until more information is given

seems fixed in the last update

great!

On Tue, Feb 10, 2015 at 3:44 AM, natostanco notifications@github.com
wrote:

seems fixed in the last update


Reply to this email directly or view it on GitHub
#3 (comment).