[Webkit-unassigned] [Bug 220773] [Cocoa] Web Inspector: Console search box is broken, advancing to next result instead pastes from system find pasteboard
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jan 25 12:22:44 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=220773
--- Comment #6 from Razvan Caliman <rcaliman at apple.com> ---
Comment on attachment 418313
--> https://bugs.webkit.org/attachment.cgi?id=418313
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=418313&action=review
>> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:64
>> this._findBanner = new WI.FindBanner(this, "console-find-banner", fixed);
>
> Instead of modifying `showing` to have all this other logic and modification sites, can we instead save `fixed` and use it inside `set targetElement` like so
> ```
> - this._targetElement.classList.remove(WI.FindBanner.ShowingFindBannerStyleClassName);
> + this._targetElement.classList.toggle(WI.FindBanner.ShowingFindBannerStyleClassName, this._fixed);
> ```
It can work, but it still relies on checking style classes to determine the component's state.
The `fixed` is not straightforward in what it implies. Rename to `alwaysShowing`?
Also, we'd need to update either the element checked in the `showing` getter from this.element to this._targetElement (and change the class name)
```
get showing()
{
- return this.element.classList.contains(WI.FindBanner.ShowingStyleClassName);
+ return this._targetElement.classList.contains(WI.FindBanner.ShowingFindBannerStyleClassName);
}
```
Or toggle the appropriate class on the other element in the `targetElement` setter.
```
if (this._targetElement)
this._targetElement.classList.add(WI.FindBanner.SupportsFindBannerStyleClassName);
+ this.element.classList.toggle(WI.FindBanner.ShowingStyleClassName, this._fixed);
```
Any preference?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210125/3faf2d20/attachment.htm>
More information about the webkit-unassigned
mailing list