-
Notifications
You must be signed in to change notification settings - Fork 6
Comparing changes
Open a pull request
base repository: odoo-dev/odoo-editor
base: fe2730b
head repository: odoo-dev/odoo-editor
compare: f63c3f9
- 18 commits
- 5 files changed
- 4 contributors
Commits on Jun 15, 2021
-
[FIX] fix getRangePosition util in Iframe context
(cherry picked from commit 184744e)
Configuration menu - View commit details
-
Copy full SHA for ec18689 - Browse repository at this point
Copy the full SHA ec18689View commit details -
Configuration menu - View commit details
-
Copy full SHA for 304fa59 - Browse repository at this point
Copy the full SHA 304fa59View commit details
Commits on Jun 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 5fea955 - Browse repository at this point
Copy the full SHA 5fea955View commit details
Commits on Jun 18, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 6aac22a - Browse repository at this point
Copy the full SHA 6aac22aView commit details
Commits on Jun 22, 2021
-
Configuration menu - View commit details
-
Copy full SHA for dc1e6e1 - Browse repository at this point
Copy the full SHA dc1e6e1View commit details -
[IMP] keep cursor in an unremovable inline element after it was emptied
We achieve this by inserting and selecting a zero-width space when deleting the element. This is so far limited to unremovable elements but we could potentially expand this logic to all inlines if we choose to have that behavior. In that case though we'd have to handle the systematic removal of these potentially parasitic zero-width spaces, and adapt a lot of tests.
Configuration menu - View commit details
-
Copy full SHA for 396f590 - Browse repository at this point
Copy the full SHA 396f590View commit details -
[FIX] always identify and unbold bold text
The current method to identify bold text failed when the "bolder" font-weight was smaller than 500, which happens if the normal font-weight is set to less than 400. This is the case with Bootstrap's "lead" class for instance. Checking if it's bigger than 500 is useful for marking headings as being bold. However we need to also check if the element's font-weight is bigger than its parent block - in which case it should be considered bold. Using `font-weight: normal` to unbold again fails if the inherited font-weight is smaller than 400 (eg: text in a ".lead" element inherits a font-weight of 300 but `font-weight: normal` is the same as `font-weight: 400` so setting `font-weight: normal` would make the text still end up bolder than the ".lead" element). In these cases we need to use the font-weight of said block. It's an imperfect heuristic but it gets the job done in the vast majority of cases.
Configuration menu - View commit details
-
Copy full SHA for 52f7fd5 - Browse repository at this point
Copy the full SHA 52f7fd5View commit details -
[FIX] properly paste escaped text and filtered html
Thus far, the editor only handled text-only pasting. This commit makes it so that it now handles html pasting, and ensures that text pasting is properly escaped (to prevent evaluating html strings on paste). When pasting html, the editor filters the nodes, their attributes and their classes through a combination of a whitelist and a blacklist. Nodes that match blacklisted or non-whitelisted selectors are removed and their contents are unwrapped recursively. Attributes and classes that are blacklisted or non-whitelisted are removed. What is kept are basic styling elements (eg: h1, strong, ...), images (with their src attribute), links (with the href attribute), and a selection of classes the edition of which is supported by the editor.
Configuration menu - View commit details
-
Copy full SHA for 4901eb8 - Browse repository at this point
Copy the full SHA 4901eb8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c66c4a5 - Browse repository at this point
Copy the full SHA c66c4a5View commit details -
[FIX] prevent <p><p><br/></p></p> on insert html
When pasting a paragraph within a paragraph, the original paragraph should split rather than allowing for nested paragraphs.
Configuration menu - View commit details
-
Copy full SHA for 3eb6522 - Browse repository at this point
Copy the full SHA 3eb6522View commit details -
[FIX] prevent editing the toolbar with the toolbar
Clicking in the (non-floating) toolbar, then on one of its buttons would edit the toolbar itself (eg., clicking on a list button would insert a list in the toolbar). This adds a check on toolbar events so they can only affect what is in the editable area.
Configuration menu - View commit details
-
Copy full SHA for 0a9d42c - Browse repository at this point
Copy the full SHA 0a9d42cView commit details -
[FIX] properly create multi-paragraph list with whitespace
This addresses a bug that occurs when selecting over two paragraphs that are separated by some whitespace. It would create multiple indented lists. Task: 2567795
Configuration menu - View commit details
-
Copy full SHA for 225993e - Browse repository at this point
Copy the full SHA 225993eView commit details -
[FIX] prevent shrunk blocks on split during insert html
When inserting HTML, we sometimes need to split blocks to prevent weird nesting of blocks. However, that process has the potential of generating shrunk blocks (blocks without a height), such as <p></p>. This prevents it from happening.
Configuration menu - View commit details
-
Copy full SHA for e3a55f4 - Browse repository at this point
Copy the full SHA e3a55f4View commit details
Commits on Jun 25, 2021
-
[FIX] do not merge similar option elements when sanitizing
The sanitizer merges similar elements together but <option> elements should never be merged because they each represent a separate option, no matter if several consecutive options are the same. Options are blocks by default so failing to recognize that was the cause of the issue.
Configuration menu - View commit details
-
Copy full SHA for e61b0b5 - Browse repository at this point
Copy the full SHA e61b0b5View commit details
Commits on Jun 28, 2021
-
[FIX] deleteContentForward on google chrome
Sometimes Google Chrome wrongly triggers an input event with `data` being `null` on `deleteContentForward` and `insertParagraph`. Luckily Chrome provides the proper signal with the event `beforeinput`. A fix had already been made for enter but not for `deleteContentForward`.
Configuration menu - View commit details
-
Copy full SHA for 38cb8d2 - Browse repository at this point
Copy the full SHA 38cb8d2View commit details
Commits on Jun 29, 2021
-
[IMP] paste text safely in editor without wrapping code in PRE tags
The system to detect if the text that was pasted contained javascript or xml was weird, buggy and risky. This reverts it so we can make use of insertText instead of insertHTML and be perfectly safe. We also preserve linebreaks in HTML.
Configuration menu - View commit details
-
Copy full SHA for 7130990 - Browse repository at this point
Copy the full SHA 7130990View commit details -
[FIX] prevent splitting the wrong parent on paste
When inserting blocks, we often need to split the node in which we're inserting. The code that makes that happen had an issue in its while statement that checked the wrong node, resulting in overreaching splits. This fixes that while statement.
Configuration menu - View commit details
-
Copy full SHA for e9346f8 - Browse repository at this point
Copy the full SHA e9346f8View commit details
Commits on Jul 1, 2021
-
[FIX] only send observerApply event when needed
REASON FOR THE FIX To correctly display the overlay over a rotated element, we need to reset the transform of the element, to be able to apply it on the overlay. Changing the style of the element in the SnippetEditor cover method would trigger a DOM mutation, which will result in setting the odooEditor observer unactive. The issue was that flushing the observer (when setting it unactive) would always send an event observerApply, even if no record was processed. It was an issue as the SnippetsMenu was triggering a content_changed event at the reception of this event, which would rerender the SnippetEditor overlay cover (and create an infinite loop of events). SOLUTION To avoid that, the observerApply event is sent only if records were processed. task-2554608
Configuration menu - View commit details
-
Copy full SHA for f63c3f9 - Browse repository at this point
Copy the full SHA f63c3f9View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff fe2730b...f63c3f9