Hello.
At first, thank you for great plugin.
After short using i noticed that in the inline commenting the inserted div breaks the paragraph tags. You can't have div tag in paragraph tag and WordPress put every line break into paragraph. It will break the paragraph and leave it blank, which causes the issues when you for example want to inline comment certain words and not the whole sentence.
So my solution is, instead of div, use span. I changed for test the code in class.WpdiscuzCore.php and changed the divs to spans. Everything works like a charm, on desktop and mobile as well. It solved my issue on my project. See the image attachment.
Of course i do not recommend to change core files, but my project will run for certain time, so no update will be needed.
Consider to change the divs to spans in next updates for solve the line breaks issues in paragraphs 🙂
Line between 2219 - 2254
public function feedbackShortcode($atts, $content = "") {
global $post;
if ($this->isWpdiscuzLoaded && comments_open($post->ID) && apply_filters("wpdiscuz_enable_feedback_shortcode_button", true) && $this->form->isUserCanSeeComments(WpdiscuzHelper::getCurrentUser(), $post->ID)) {
$atts = shortcode_atts([
"id" => "",
"question" => "",
"opened" => 0
], $atts, self::WPDISCUZ_FEEDBACK_SHORTCODE);
if ($atts["id"] && $atts["question"] && ($inline_form = $this->dbManager->getFeedbackFormByUid($post->ID, $atts["id"]))) {
$content = "<span class='wpd-inline-shortcode wpd-inline-" . ($inline_form->opened && $this->form->isUserCanComment(WpdiscuzHelper::getCurrentUser(), $post->ID) ? "opened" : "closed") . "' id='wpd-inline-" . $inline_form->id . "'>" . html_entity_decode($content);
$content .= "<span class='wpd-inline-icon-wrapper'>";
$content .= "<svg class='wpd-inline-icon" . ($this->options->inline["inlineFeedbackAttractionType"] === "blink" ? " wpd-ignored" : "") . "' xmlns='https://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path class='wpd-inline-icon-first' d='M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z'/><path class='wpd-inline-icon-second' d='M0 0h24v24H0z' /></svg>";
$args = [
"count" => true,
"meta_query" => [
[
"key" => self::META_KEY_FEEDBACK_FORM_ID,
"value" => $inline_form->id,
"compare" => "=",
],
],
];
$count = get_comments($args);
$content .= "<span class='wpd-inline-icon-count" . esc_attr($count ? " wpd-has-comments" : "") . "'>" . esc_html($count) . "</span>";
$content .= "<span class='wpd-inline-form-wrapper'>";
$content .= "<span class='wpd-inline-form-question' style='display: block;'>" . esc_html($inline_form->question);
$content .= "<span class='wpd-inline-form-close'><a href='#'>x</a></span>";
$content .= "</span>";
$content .= "</span>";
$content .= "</span>";
$content .= "</span>";
}
}
return $content;
}



