Redactor 1.1 in Matrix and toolbarFixed enabled causes issues with multiple blocks
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
Description
When adding Matrick blocks with a Redactor 1.1 field in them and "toolbarFixed": true in the Redactor .json config, the toolbar keeps disappearing, getting stuck on the wrong field, moving to the right when multiple blocks are present on the same page (multiple matrix blocks with instances of Redactor).
I have disabled all other plugins to test this and still get this erratic behavior. The only message in JS console is Double-instantiating a menu button on an element from garnish.js:220 - but that's there on load, before adding any Redactor fields, so I don't think it's related.
If I set toolbarFixed to false, everything works normally - but that's not practical for clients once they put a few lines of text and can't see the menu anymore.
Steps to reproduce
- Install Redactor 1.1
- Add Redactor to a matrix field
- Add
toolbarFixed: trueto Redactor json config - Add a few matrix blocks, add enough text to extend over page height
- Redactor toolbar disappears, moves to right, gets stuck from other matrix blocks
Additional info
Craft version: 3.0.1
PHP version: PHP 7.1.10 (cli) (built: Oct 4 2017 08:54:01)
Database driver & version: MySQL 5.7.19
Plugins & versions: Redactor 1.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with Redactor 1.1 inside multiple Matrix blocks and toolbarFixed: true, then compare behavior with it disabled. Start by checking the garnish.js:220 console message and the Redactor/Matrix toolbar behavior; done means the toolbar stays visible and attached to the correct field as blocks and content grow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100