Skip to content
Snippets Groups Projects
Commit 566c4d18 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1199 from greezybacon/issue/redactor-image-insert


html: Fix dropped text after inserted image

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents e0a86a5f 402d4be9
No related branches found
No related tags found
No related merge requests found
...@@ -720,9 +720,9 @@ $tcount+= $ticket->getNumNotes(); ...@@ -720,9 +720,9 @@ $tcount+= $ticket->getNumNotes();
}?> }?>
</select> </select>
&nbsp;<span class='error'>*&nbsp;<?php echo $errors['state']; ?></span> &nbsp;<span class='error'>*&nbsp;<?php echo $errors['state']; ?></span>
</div>
</td> </td>
</tr> </tr>
</div>
</table> </table>
<p style="padding-left:165px;"> <p style="padding-left:165px;">
......
...@@ -255,6 +255,13 @@ $(function() { ...@@ -255,6 +255,13 @@ $(function() {
el.redactor('set', '', false, false); el.redactor('set', '', false, false);
}); });
} }
$('input[type=submit]', el.closest('form')).on('click', function() {
// Some setups (IE v10 on Windows 7 at least) seem to have a bug
// where Redactor does not sync properly after adding an image.
// Therefore, the ::get() call will not include text added after
// the image was inserted.
el.redactor('sync');
});
if (el.hasClass('draft')) { if (el.hasClass('draft')) {
el.closest('form').append($('<input type="hidden" name="draft_id"/>')); el.closest('form').append($('<input type="hidden" name="draft_id"/>'));
options['plugins'].push('draft'); options['plugins'].push('draft');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment