Drag & Drop fix. Thx @johnyma22 for reporting

This commit is contained in:
Jean-Tiare Le Bigot 2012-03-04 00:46:56 +01:00
parent ddac4d7d38
commit 94c0ff55e3
2 changed files with 13 additions and 9 deletions

View file

@ -2975,7 +2975,7 @@ function Ace2Inner(){
return str.replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' '); return str.replace(/[\n\r ]/g, ' ').replace(/\xa0/g, ' ').replace(/\t/g, ' ');
} }
//FIXME: duplicated with contentcollector.js //FIXME: duplicated with contentcollector.js ?
var _blockElems = { var _blockElems = {
//blocks and paragraphs //blocks and paragraphs
"div": 1, "div": 1,
@ -2986,6 +2986,8 @@ function Ace2Inner(){
"ol": 1, "ol": 1,
"ul": 1, "ul": 1,
//titling styles //titling styles
//fixme: they are blocks in this file but *not* in contentcollector.js
// => there times were I really feal like a hacker :s
"h1": 1, "h1": 1,
"h2": 1, "h2": 1,
"h3": 1, "h3": 1,

View file

@ -85,10 +85,12 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
"ol": 1, "ol": 1,
"ul": 1, "ul": 1,
//titling styles //titling styles
"h1": 1, //fixme: they actually *are* blocks but handling them as blocks breaks Drag&Drop
"h2": 1, // => what is the real meaning of this structure ???
"h3": 1, //"h1": 1,
"h4": 1, //"h2": 1,
//"h3": 1,
//"h4": 1,
}; };
function isBlockElement(n) function isBlockElement(n)
@ -185,10 +187,10 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
"ol": 1, "ol": 1,
"ul": 1, "ul": 1,
//titling styles //titling styles
"h1": 1, //"h1": 1,
"h2": 1, //"h2": 1,
"h3": 1, //"h3": 1,
"h4": 1, //"h4": 1,
}; };
function _isEmpty(node, state) function _isEmpty(node, state)