Opened 12 years ago
Closed 12 years ago
#22257 closed defect (bug) (fixed)
Visual editor is locked after inserting an image/a gallery
Reported by: | ocean90 | Owned by: | koopersmith |
---|---|---|---|
Milestone: | 3.5 | Priority: | low |
Severity: | normal | Version: | 3.5 |
Component: | TinyMCE | Keywords: | needs-patch |
Focuses: | Cc: |
Description
From the alpha/beta forum
- Create a new post
- Switch to visual editor if not yet
- Insert an image through the new media modal
- Try to add some text to the editor
The last step doesn't work in Chrome and Safari. Seems like the editor is locked.
Attachments (2)
Change History (11)
#3
@
12 years ago
Been looking at this for some time. The only way to place the caret before/after a "view" is to have a visible spaces there. That means we will have to change the styling for block element views (make them inline-block with width=99%) so the before/after spaces aren't pushed on separate lines, or it looks like there are empty lines above/below the view.
#4
follow-up:
↓ 5
@
12 years ago
In 22257.patch:
- Add padding before and after a view if the surrounding strings don't end/begin with a space.
- Drop the 'div' view wrapper. All wrappers are now spans with display: inline-block (todo: remove the wrapper from the view options).
- Some css tweaks to display the image and gallery views properly.
#6
@
12 years ago
From quick testing, the spacing doesn't seem to be respecting any of the alignment classes. In some alignment cases, I'm seeing carets that place text before the view appearing after the view, and in others, I'm seeing carets that place text after the view appear before the view.
Any ideas?
#7
@
12 years ago
Yeah, that's when the view wrapper is floated. The spaces are normal text nodes around it, so they follow the normal css logic and move to the opposite side of the floated view.
Another thing I've tested was to add space only after a view (if there's no text node or if the text doesn't start with a space). This wouldn't let the caret to go before a view but that will be a problem only if the view is the first element in the post, pretty much the same as images behave in 3.4.
Then we can insert a zero-width text node and force the caret in it when the left arrow key is used for navigation.
Yet another possibility would be to do that on both sides, i.e. when a view is selected, pressing the left/right arrow key would insert zero-width text note and force the caret there. Tried that too but didn't work straight away (currently the views "lock" the caret when it reaches them and attempts to get it out of there don't work).
#8
@
12 years ago
- Priority changed from high to low
Removing views, see #21813 (comment 30), should resolve this for 3.5.
#22313 was marked as a duplicate.