Development: Very specific problem with getting the caret position in a contenteditable div

Hello, I'm a web developer. I'm using the Firefox Developer Edition and currently working on a project that requires caret manipulation. I have this function right here t… (read more)

Hello, I'm a web developer. I'm using the Firefox Developer Edition and currently working on a project that requires caret manipulation. I have this function right here that fetches the caret's client rect: ``` function getCaretRect(): DOMRect | null {

 const sel = window.getSelection()
 if (!sel || sel.rangeCount === 0) return null
 const range = sel.getRangeAt(0)
 const rects = range.getClientRects()
 if (rects.length === 0) return null
 return rects[0]

} ``` Here is where the issue arises. Suppose I have a contenteditable div with two line breaks (no new lines), and the second line is smaller than the first one. If the caret is positioned somewhere that is further than the end of the second line, and I press the down arrow key, then left, for some reason the caret rect I get has all values set to zero, like this: `{ x: 0, y: 0, width: 0, height: 0, top: 0, right: 0, bottom: 0, left: 0 }` I will add an image to explain further.

I don't have this issue on Chromium based browsers, but cross browser support is important for me.

There is one more issue to do with caret manipulation which is how contenteditable divs are handled. On a Chromium based browser, if I have a parent div that's contenteditable, then another div that's not contenteditable (contenteditable="false" explicitly), then two children divs which are both contenteditable (or more), I can navigate through the divs freely using the arrow keys and focus is managed better alongside event handlers. This is not present on Firefox, however.

If this is not the right place to ask for help then please guide me where is more suitable.

Asked by Rayane Benamre 9 hours ago

Last reply by cor-el 26 minutes ago

Picture In Picture mode isnt sticky

Im using Ubuntu 22.04 LTS Intel cpu I7 9th gen NVIDIA gpu but i disabled it My problem is that the Picture in Picture mode isnt sticky if i press anything it vanishes fro… (read more)

Im using Ubuntu 22.04 LTS Intel cpu I7 9th gen NVIDIA gpu but i disabled it My problem is that the Picture in Picture mode isnt sticky if i press anything it vanishes from view.

Asked by Mcmunhuu 4 days ago

Last reply by cor-el 35 minutes ago

Why are sites no longer working on Firefox?

I am finding more and more sites that I regularly go to are no longer working on firefox. One site was because HTML5 apparently does not work on firefox. But others I don… (read more)

I am finding more and more sites that I regularly go to are no longer working on firefox. One site was because HTML5 apparently does not work on firefox. But others I don't know about why are no longer working on firefox. I thought it might be streaming related but just today I could not access one of my banks on firefox, and I tried many times, but had no problem signing on using Chrome.

Asked by bjhansen53 1 day ago

Last reply by jonzn4SUSE 38 minutes ago

Sonoma Mac OS 14.5 - Power Consumption by FIREFOX even in suspend mode killing battery power over night

Hi, ist the famous and great Mozilla FireFox Developer team aware of the issue and is working on it? I am happey to describe in more detail if required. thx … (read more)

Hi,

ist the famous and great Mozilla FireFox Developer team aware of the issue and is working on it?

I am happey to describe in more detail if required. thx

Asked by FireFox MacBook Air 13 hours ago

Last reply by jonzn4SUSE 42 minutes ago

In Firefox, after a reboot, how can I re open my previouse sessions?

In Firefox, after a reboot, how can I re open my previouse sessions? Originally I had quite a lot of open browsers & tabs. Then I needed to do a reboot, and now I've… (read more)

In Firefox, after a reboot, how can I re open my previouse sessions?

Originally I had quite a lot of open browsers & tabs. Then I needed to do a reboot, and now I've lost those previouse sessions.

Usually I just open firefox, and this opens one browser, and then all of my previous browser, and tab reopen, but this time firefox crashed, and its popup said it needed to restart, but it would re-open my previous browser and tab, but it didnt.

After following the usuall firefox help giudes, it still wouldn't re open my previouse sessions. Now if I ask it to open my previouse sessions, it just opens the recent help giudes, and not anything before the crash.

So is there a backup file of myu missing sessions that I can roll back to?

Asked by macmac 2 days ago

Last reply by jonzn4SUSE 43 minutes ago

I can no longer use my camera on firefox

I can no longer use my camera on firefox, firefox displayed some message about camera when we were trying to chat, but I missed it, I have granted relevant permissions on… (read more)

I can no longer use my camera on firefox, firefox displayed some message about camera when we were trying to chat, but I missed it, I have granted relevant permissions on the site, that we use reularly. The camera icon on the address bar appears red, and I noticed that in Windows security, it lists firefox access requests, but shows no way to grant these requests.

I am not tech minded so please if anyone could keep it simple, I would appreciate it.

Asked by sparrow08 1 hour ago

Last reply by cor-el 48 minutes ago

Error while trying to Login to a PARTICULAR website

The website is https://groceries.morrisons.com/webshop/startWebshop.do I enter my username & password and nothing happens. This occurs when I use Dashlane AND also … (read more)

The website is https://groceries.morrisons.com/webshop/startWebshop.do

I enter my username & password and nothing happens. This occurs when I use Dashlane AND also if I enter username & password manually.

I can access my account successfully using Edge.

Asked by IanM 1 day ago

Last reply by cor-el 59 minutes ago

Emulate Chrome/Edge Open In New Tab Behaviour

Hi, I'm switching from Edge and have a frustrating issue. In Edge I am very used to having separate behaviour for links with left and middle click. i.e. from Gmail, if… (read more)

Hi,

I'm switching from Edge and have a frustrating issue.

In Edge I am very used to having separate behaviour for links with left and middle click.

i.e. from Gmail, if I left click a link it opens in a new tab and switches to the tab, if I middle click a link it opens in a new tab but stays on the current tab

In Firefox both seem to be controlled by the single setting.

I have looked in about:config and tried changing a few flags but cannot seem to find a combination that works how I want it.

Can anyone help?

This is a real dealbreaker for me and I will switch back if there's no solution :(

TIA

Asked by doowruc 15 hours ago

Last reply by cor-el 1 hour ago

Ability to disable RTX HDR on selective sites?

Right now i love my HDR content in most scenarios, except on a few sites where its just bad. Is it possible to be able to block it on certain sites where you dont want to… (read more)

Right now i love my HDR content in most scenarios, except on a few sites where its just bad. Is it possible to be able to block it on certain sites where you dont want to apply it?

Asked by Dajova 4 hours ago

Last reply by Online Billing 2 hours ago

Firefox opens up a second browser screen automatically when I am already in a website!

When I login to my main Firefox browser and then access a website within a short while the browser screen opens up again automatically. In other words, a second window w… (read more)

When I login to my main Firefox browser and then access a website within a short while the browser screen opens up again automatically. In other words, a second window which is very irritating. How can I stop this from happening?

Asked by graemesmith300653 4 months ago

Last reply by munrorod 3 hours ago

Firefox Screenshot Title Issue

When I used to take screenshots, they would be automatically named with the date, time, and part of the text captured regardless of language. A few days ago and with no r… (read more)

When I used to take screenshots, they would be automatically named with the date, time, and part of the text captured regardless of language. A few days ago and with no reason I can discern, it now saves any non-English screenshots with something like this "Screenshot 2024-06-23 a[...].png" instead of "Screenshot 2024-06-22 at 08-02-28 Politics Policy Polit[...].png" (usual for English text and what I used to get with all languages).

Which means I have to manually rename screenshots. Does anyone know how I can fix this because I am working on a project with lots of screenshots for topics from different languages?

Asked by AA 20 hours ago

Last reply by Agent virtuel 19 hours ago

audio no firefox

gente, o que aconteceu com o firefox (normal, beta e nightly) que não funciona mais áudio. já tentei de tudo para reconfigurar, baseado em tutoriais na web, porém não se … (read more)

gente, o que aconteceu com o firefox (normal, beta e nightly) que não funciona mais áudio. já tentei de tudo para reconfigurar, baseado em tutoriais na web, porém não se consegue mais ouvir áudio nos firefox.

Asked by nelioj 1 day ago

Last reply by jonzn4SUSE 6 hours ago

Bing "ate" my Firefox setup.

As a longtime user of Firefox, I had a nice setup where after the start page, clicking on the Firefox icon would take me to a page headed "Firefox" in large letters. On t… (read more)

As a longtime user of Firefox, I had a nice setup where after the start page, clicking on the Firefox icon would take me to a page headed "Firefox" in large letters. On that page I had placed the icons for my frequently used programs. Each of the small "icon boxes" had menus that would allow entering a URL so that when clicked, the desired app would open. I was exploring MS Bing, mostly because I like the pictures they put up each day. It looks as though a "new Improved" version of Bing brings along the new MS AI component. Together they seem to have removed my Firefox setup or hidden it where I can't retrieve it. By using Firefox settings, I was able to remove the Bing URL. Good riddance!, but can I retrieve my page of links to most-used programs? I don't know where to look for that. If I have to reconstruct it, how is that done. Or how can I start a replacement. Sincere thanks, Greg Schultz

Asked by GregS 7 hours ago

Last reply by James 6 hours ago

SCORM modules hang on loadingn

Hi, I need to take part in a course that is delivered via moodle and that employs SCORM videos. After some modules I am experiencing an issue where firefox does not loa… (read more)

Hi,

I need to take part in a course that is delivered via moodle and that employs SCORM videos.

After some modules I am experiencing an issue where firefox does not load them anymore. When you try to load a module a spinner appears and stays there indefintely.

Initially, trying to reload the module could eventually unblock it. Now this is not possible anymore. Disabling the enhanced protection does not change the situation.

The modules work just fine with chromium.

Having firefox being a stopper for online learning resources is a real issue. Any help will be appreciated.

Asked by sergio.callegari 13 hours ago

Last reply by TyDraniu 9 hours ago

Separate Themes for Private Browsing

Is there a way to set a separate theme for the private browsing option? I like being able to visually distinguish between the normal browser and the private one, but enab… (read more)

Is there a way to set a separate theme for the private browsing option? I like being able to visually distinguish between the normal browser and the private one, but enabling a theme seems to set the same visuals for both.

If separate themes are not a thing, perhaps they could be added in a later update?

Thanks for all your time and effort.

Asked by Manny 2 days ago

Last reply by Agent virtuel 11 hours ago

Google Sign in's

Ive tried everything under the Sun to try to get rid of that Annoying ( Sign in with Google) out of my computer but nothing works ?? Is there a solution ?? I ca… (read more)

Ive tried everything under the Sun to try to get rid of that Annoying ( Sign in with Google) out of my computer but nothing works ?? Is there a solution ?? I cannot open most of my Sites with it there !! Anyone Please HELP !!

Asked by particolor 18 hours ago

Last reply by Agent virtuel 12 hours ago

I did did buy a new PC, and i can't find my Password's and Bockmark's anymore?? They was saved in my Account but they got deleted how ?

I need a Backup from my Account because all my Passwords and Bookmarks are not there anymore. They was saved in my Account it work't allways well till yesterday ! … (read more)

I need a Backup from my Account because all my Passwords and Bookmarks are not there anymore. They was saved in my Account it work't allways well till yesterday !

Asked by Musti 43 13 hours ago

Last reply by Paul 12 hours ago

No Youtube Network Activity on Firefox only (videos won't finish loading)

I have been having consistent issues with Youtube when played on Firefox. Opening the "Stats for Nerds", I see that I have decent connection speed. However, I get a burst… (read more)

I have been having consistent issues with Youtube when played on Firefox. Opening the "Stats for Nerds", I see that I have decent connection speed. However, I get a burst of network activity, and then it stops. Therefore, i can't watch the video. Refreshing Youtube does not help at all.

Trying on other browsers, I do not have issue. While I sometimes get low network activity, most often than not, I can play Youtube videos fine.

I have done the following:

  • Confirmed that I'm running the latest Firefox version (127.0.0)
  • Cleared Firefox cache
  • Confirmed having issue (sometimes worse as I get no network activity even on refresh) on Firefox Troubleshoot mode

Asked by desmond.wan913 20 hours ago

Last reply by TyDraniu 15 hours ago