Dette websted vil have begrænset funktionalitet, mens vi gennemgår vedligeholdelse for at forbedre din oplevelse. Hvis en artikel ikke løser dit problem, og du vil stille et spørgsmål, har vi vores supportfællesskab, der venter på at hjælpe dig på @FirefoxSupport på Twitter og/r/firefox på Reddit.

Søg i Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Læs mere

find highlighting wrong text in page source

  • 13 svar
  • 1 har dette problem
  • 3 visninger
  • Seneste svar af HSV_Rocket

more options

Even when using Safe Mode, Firefox sometimes highlights the wrong text when using "find" in the Page Source tab. The desired text is displayed white-on-white and often is off the displayed portion of the Page Source tab.

Even when using Safe Mode, Firefox sometimes highlights the wrong text when using "find" in the Page Source tab. The desired text is displayed white-on-white and often is off the displayed portion of the Page Source tab.

Alle svar (13)

more options

Could be a problem with hardware acceleration or an extension.

Start Firefox in Safe Mode to check if one of the extensions ("3-bar" menu button or Tools -> Add-ons -> Extensions) or if hardware acceleration is causing the problem.

  • switch to the DEFAULT theme: "3-bar" menu button or Tools -> Add-ons -> Themes
  • do NOT click the "Refresh Firefox" button on the Safe Mode start window
more options

As I said in my original post, I've already tried Safe Mode. I tried manually selecting the Default theme even though that's what I always use, but that didn't make any difference. It still highlights the wrong text. I also tried switching the default font and size, which didn't help.

Here's the page that I'm looking for "contractSymbol" in the Page Source: https://finance.yahoo.com/quote/AA/options?p=AA&date=1561680000

more options

Seems to be working fine here. I get 92 results.

Are you using "View Page Source" in the right-click context menu or other menus (Web Developer) or do use View Selection Source (both work)?

more options

I've tried the right-click menu>View Page Source, Tools>Web Developer>Page Source and Triple-Bar>Web Developer>Page Source all with the same results. May be it's a Windows 7 issue. That's what I'm running. To be clear, Find locates text, but what I see as highlighted is sometimes not the text that I was searching for. And, if I look around the highlighted text I can sometimes find a blank space, which when selected shows to be the sought text. Finding other text works correctly.

more options

What does highlight all produce ?

more options

If you mean was does Edit>Select All or Ctrl+A do, it displays all the text as white characters on a blue background. Using "find" causes the text to be displayed as white characters on a light green background. My problem is that sometimes the highlighted text is not what I was searching for.

more options

This is about the "Highlight All" button on the Find bar to highlight all results. This uses a different background color.

more options

If I find "contractSymbol" it finds 104 occurrences, all wrong and all highlighted in the same light green as when highlight all is OFF. Note, the data on the page is dynamic and has changed since you did the search with Highlight All.

more options

This data seems to be part of the App.main object that you can browse with the Web Console (disable all items to get a steady display).

  • App.main.context.dispatcher.stores.OptionContractsStore.contracts

Looks that this is what you are after for. I have attached some screenshots that show this object in the Web Console.

If you want to backup/extract this data:

prompt("App.main.context.dispatcher.stores.OptionContractsStore.contracts",JSON.stringify(App.main.context.dispatcher.stores.OptionContractsStore.contracts));

(edited for the correct object)

Ændret af cor-el den

more options

Sorry for the slow response. I was out of town. I have a data scraping program that I wrote in C++. Yahoo made a change to the option page that caused my program to miss some data. The key to finding the data I want is the label "contractSymbol", which is why I was using Firefox's "find" to locate instances of it. I was able to solve the problem in my program by manually scanning the html using "View Page Source". Still, it would be nice to know while "find" was highlighting the wrong text since a similar problem is likely to occur in the future.

more options

My screenshot is attached for what it's worth.

I don't know what would cause highlighting to be offset from the correct location. Sometimes strange things happen that are corrected with a couple Page Up/Page Down keystrokes. (I might be confusing Firefox with MS Word on that.)

more options

The only reasons for such an offset that I can think of are hardware acceleration and issues with a font that takes more space than Firefox calculates and thus the highlight may end up in a different position (the highlight isn't done via CSS, but is done via JavaScript).

more options

Thanks for the screen shot. I didn't have wrapping turned on for View Source. Turning it on, fixed the problem!

Thanks again