[MERGE] forward port branch 10.0 up to 2198220947
This commit is contained in:
@@ -578,6 +578,28 @@ var RTE = Widget.extend({
|
||||
_.defer(function () {
|
||||
self.historyRecordUndo($target, 'activate', true);
|
||||
});
|
||||
|
||||
// To Fix Google Chrome Tripleclick Issue, which selects the ending
|
||||
// whitespace characters (so Tripleclicking then typing text will remove
|
||||
// the whole paragraph instead of its content).
|
||||
// http://stackoverflow.com/questions/38467334/why-does-google-chrome-always-add-space-after-selected-text
|
||||
if ($.browser.chrome === true && event.originalEvent.detail === 3) {
|
||||
var currentSelection = range.create();
|
||||
if (currentSelection.sc.parentNode === currentSelection.ec) {
|
||||
_selectSC(currentSelection);
|
||||
} else if (currentSelection.eo === 0) {
|
||||
var $hasNext = $(currentSelection.sc).parent();
|
||||
while (!$hasNext.next().length && !$hasNext.is('body')) {
|
||||
$hasNext = $hasNext.parent();
|
||||
}
|
||||
if ($hasNext.next()[0] === currentSelection.ec) {
|
||||
_selectSC(currentSelection);
|
||||
}
|
||||
}
|
||||
}
|
||||
function _selectSC(selection) {
|
||||
range.create(selection.sc, selection.so, selection.sc, selection.sc.length).select();
|
||||
}
|
||||
},
|
||||
|
||||
editable: function () {
|
||||
|
||||
@@ -24,7 +24,9 @@ html, body {
|
||||
/* ----- GENERIC LAYOUTING HELPERS ---- */
|
||||
/* table */
|
||||
#wrapwrap, .o_editable {
|
||||
table.table {
|
||||
// Only style editor-made tables (shop/portal/... tables are not supposed to
|
||||
// use table-bordered...)
|
||||
table.table.table-bordered {
|
||||
table-layout: fixed;
|
||||
td {
|
||||
min-width: 20px;
|
||||
|
||||
Reference in New Issue
Block a user