# Edit CSS/HTML editor cursor offset makes it unusable due to CSS font override

**URL:** https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725
**Category:** Support
**Created:** [March 18, 2020, 3:22pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725 "2020-03-18T15:22:07Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![amatthews](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amatthews/32/173173_2.png) [@amatthews](https://meta.discourse.org/u/amatthews)
#### Post date: [March 18, 2020, 3:22pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/1 "2020-03-18T15:22:08Z")

</div>

I’m a first time user of Discourse, having inherited the administration of the site from another coworker. As I’m working through a backlog of UI requests I’m noticing that the editor to make these changes is almost unusable.

By that I mean when I place my cursor at a spot to edit a character, I wind up editing a character a dozen or more characters to the left of where my cursor is. Here’s a visual…

 ![Screen Shot 2020-03-18 at 10.19.39 AM](https://global.discourse-cdn.com/meta/original/3X/e/d/eda24a08c22cc24b39b62ea8f27df37b5e4837f7.png)

I’ve clicked the end of the line, yet my cursor shows almost an inch to the right (in white space) yet if I clicked backspace the semicolon is deleted. I can get around this by copying the content out to my text editor, updating the code there, and pasting it back in. This CAN’T be the intended behavior, but I have no idea why this is happening. Is this editor a plugin?

According to the meta tags I’m running **Discourse 2.4.1** , and I’ve been told we’re hosted by Discourse as opposed to hosting our own version.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 18, 2020, 3:40pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/2 "2020-03-18T15:40:50Z")

</div>

Not sure why that would happen. I’ve never seen it. My best guess is something in your theme is broken. You might try safe-mode (`https://yoursite/safe-mode`). Also, if you have much theme cruft to clean up, you should definitely check out [Install the Discourse Theme CLI console app to help you build themes](https://meta.discourse.org/t/discourse-theme-cli-console-app-to-help-you-build-themes/82950) so you can just work in your favorite editor the way that God intended.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 18, 2020, 11:20pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/3 "2020-03-18T23:20:44Z")

</div>

> [@amatthews](#):
>
> I’ve been told we’re hosted by Discourse as opposed to hosting our own version.

Are you sure? If you are on our hosting you’d be on the current beta (2.5). I suggest digging a bit deeper. Does your admin control panel mention us?

---

<div class="post-metadata">

### Author: ![amatthews](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amatthews/32/173173_2.png) [@amatthews](https://meta.discourse.org/u/amatthews)
#### Post date: [March 19, 2020, 4:29pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/4 "2020-03-19T16:29:18Z")

</div>

I’m wondering that myself actually Jeff. Where would I go to determine whether we’re hosted by Discourse or ourselves?

Here’s some details:

```
$whois eventtribe.com
Name Server: DNS1.P05.NSONE.NET
Name Server: DNS2.P05.NSONE.NET
nserver: A.GTLD-SERVERS.NET
nserver: B.GTLD-SERVERS.NET

$ ping eventtribe.com
PING eventtribe.com (198.7.63.115): 56 data bytes

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 19, 2020, 4:44pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/5 "2020-03-19T16:44:34Z")

</div>

If you were hosted by CDCK your name would resolve to a cname pointing to their domain. It’s a good bet that you are self-hosted . . . somehow. Perhaps this will give you a clue: [https://www.ip2location.com/demo/198.7.63.115](https://www.ip2location.com/demo/198.7.63.115), but maybe not.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 19, 2020, 4:47pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/6 "2020-03-19T16:47:44Z")

</div>

I can assure you Discourse doesn’t host `www.eventtribe.com`.

---

<div class="post-metadata">

### Author: ![amatthews](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amatthews/32/173173_2.png) [@amatthews](https://meta.discourse.org/u/amatthews)
#### Post date: [March 20, 2020, 5:47pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/7 "2020-03-20T17:47:47Z")

</div>

😃 I imagine you’d know then wouldn’t you?

Is Sam’s post the best place to start reading about upgrading?

> [@Manually update Discourse and Docker image to latest](https://meta.discourse.org/t/how-do-i-manually-update-discourse-and-docker-image-to-latest/23325):
>
> bookmark This guide provides step-by-step instructions for manually updating Discourse, the Docker container, and the Ubuntu operating system on a self-hosted setup. person_raising_hand Required user level: System Administrator warning SSH access to the server. If you self-host Discourse, you occasionally need to run a manual update via the command line to get the latest security releases and newest libraries. These updates are not picked up in admin/upgrade, which is why you’ll occa…

---

<div class="post-metadata">

### Author: ![amatthews](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amatthews/32/173173_2.png) [@amatthews](https://meta.discourse.org/u/amatthews)
#### Post date: [March 20, 2020, 6:04pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/8 "2020-03-20T18:04:10Z")

</div>

Aha. Checked with my marketing team lead and it turns out that we’re hosted with [https://www.communiteq.com/](https://www.communiteq.com/).

I know nothing about this company, is there anything I _should_ know? 😃

I’ll put in a ticket with them to ask about the editor issue.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 20, 2020, 6:56pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/9 "2020-03-20T18:56:46Z")

</div>

They are good people, they post here often and we support each other 🤝

More Discourse = More Bettererish

---

<div class="post-metadata">

### Author: ![amatthews](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amatthews/32/173173_2.png) [@amatthews](https://meta.discourse.org/u/amatthews)
#### Post date: [March 20, 2020, 8:25pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/10 "2020-03-20T20:25:15Z")

</div>

That’s really good to hear Jeff, thanks!

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [March 21, 2020, 5:19pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/11 "2020-03-21T17:19:27Z")

</div>

I took the liberty of taking a look at this. It is caused by the Lato font which is being inserted by the “Fonts” theme component and applied to all elements (\*). It is not a fixed width font and apparently the editor does not work well with that. Using /safe-mode works around the issue.

The actual cause is that you are applying that font to all elements by using the `*` selector. If you change this to `html` then you get the regular CSS inheritance and specificity back and your editor will get the correct font.

---

<div class="post-metadata">

### Author: ![amatthews](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amatthews/32/173173_2.png) [@amatthews](https://meta.discourse.org/u/amatthews)
#### Post date: [March 25, 2020, 9:02pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/12 "2020-03-25T21:02:23Z")

</div>

Thanks Michael! I want to preface this by saying that I inherited this from a previous coworker. 😃

I did as you suggested and you’re right, it does indeed fix it. I will say I’m a bit surprised that you can make CSS changes and have them pulled into the settings area. But what you suggested makes total sense. Thanks again for your time!

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [March 25, 2020, 9:33pm UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/13 "2020-03-25T21:33:16Z")

</div>

> [@amatthews](#):
>
> I’m a bit surprised that you can make CSS changes and have them pulled into the settings area.

Me too actually - it didn’t use to be like that as far as I can remember.  
OTOH `*` is a really evil selector.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 1, 2024, 8:23am UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/14 "2024-04-01T08:23:22Z")

</div>



---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [April 1, 2024, 10:20am UTC](https://meta.discourse.org/t/edit-css-html-editor-cursor-offset-makes-it-unusable-due-to-css-font-override/144725/15 "2024-04-01T10:20:34Z")

</div>


