Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3PC RichText TV textareas suddenly broken in 2.5.x #13070

Closed
pixelchutes opened this issue Jul 15, 2016 · 8 comments
Closed

3PC RichText TV textareas suddenly broken in 2.5.x #13070

pixelchutes opened this issue Jul 15, 2016 · 8 comments

Comments

@pixelchutes
Copy link
Contributor

Summary

Since merging #13045, it seems any TV textarea rendered with 3PC (like Ace) are now broken.

The font + sizing is no longer the same, and the cursor positioning becomes invalid (off to the right), with new characters appearing at the wrong place during insertion.

Step to reproduce

  1. Ensure running MODX 2.5.x-dev (62fe227 or above)
  2. Create TV textarea(s) for a given Template
  3. Install Ace Extra, and activate for use w/ TVs
  4. Edit Resource tied to above Template
  5. Attempt editing Ace TV

Observed behavior

  • TVs rendered by Ace now show incorrect font-family.
  • Cursor position is also invalid (appearing off to the right)
  • Character insertion is incorrect (appearing off to the left)

Before:

tv_before

#### After:

tv_after

Expected behavior

  • Font should remain as before ('Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;).
  • Cursor should show up where you would expect.
  • New characters should follow the cursor.

Simply removing the recently added CSS resolves both the look and functionality:

/* Offending CSS */
.modx-tv .x-form-textarea {
    font-family: inherit;
}

Environment

MODX 2.5.x-dev

@Mark-H
Copy link
Collaborator

Mark-H commented Jul 15, 2016

Perhaps the CSS definition in Ace could be more specific? Kinda an addon issue, tho it's annoying it's caused by a core change.

@pixelchutes
Copy link
Contributor Author

Yeah, I debated where I should file this because of that. Unless there's a way to do it in core to adjust the specificity, potentially accounting for scenario like this? (Long shot? 🏀)

@pixelchutes
Copy link
Contributor Author

MODX Extras aside, I personally preferred the "Courier New", Courier, monospace font of vanilla TV textarea as it was before. To each their own! Likely depends on how you're using it (such as for code, like JS/JSON/CSS, or simply text.) I could see how each could be better in different scenarios.

@pixelchutes
Copy link
Contributor Author

pixelchutes commented Jul 15, 2016

Something like this appears to fix:

.modx-tv .x-form-textarea:not(.ace_editor) {
    font-family: inherit;
}

UPDATE: Better, more generic:

.modx-tv .x-form-textarea:not(div) {
    font-family: inherit;
}

@Mark-H
Copy link
Collaborator

Mark-H commented Jul 15, 2016

Yuck.. :/

@pixelchutes
Copy link
Contributor Author

See 🏀 above 😉

pixelchutes added a commit to pixelchutes/revolution that referenced this issue Jul 15, 2016
@pixelchutes
Copy link
Contributor Author

@Mark-H OK, how about now? I rebased to be more generic. :not(div) works just the same, but maintains new core functionality from #13045. No more 3PC-specific mention(s). 👍

@pixelchutes pixelchutes changed the title Ace RichText TV textareas suddenly broken in 2.5.x 3PC RichText TV textareas suddenly broken in 2.5.x Jul 15, 2016
Jako pushed a commit that referenced this issue Jul 21, 2016
- Fixes #13070

Contains also an update of FontAwesome from 4.6.1 to 4.6.3
@Jako
Copy link
Collaborator

Jako commented Jul 21, 2016

Merged into 2.5.1

@Jako Jako closed this as completed Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants