obsidian-dictionary icon indicating copy to clipboard operation
obsidian-dictionary copied to clipboard

[Bug]: Dictionary view pane does not work on mobile

Open oxdc opened this issue 3 years ago • 2 comments

Describe the bug

The pane won't show anything except the input box, see the screenshot below,

image

If one emulates the mobile mode on a PC, contents and buttons are there but the page is misaligned,

image

Relevant errors (if available)

No response

Steps to reproduce

On a mobile:

  1. Open the command palette;
  2. Open the dictionary view;
  3. Type a word and hit Enter.

On a PC:

  1. Open the Obsidian Developer Console by pressing Ctrl + Shift + I;
  2. Execute app.emulateMobile(true) in the console;
  3. Open the command palette;
  4. Open the dictionary view;
  5. Type a word and hit Enter.

Expected Behavior

image

Addition context

No response

Language

No response

API Name

No response

Operating system

Android

oxdc avatar Feb 09 '22 12:02 oxdc

I figured it out on my own, see #64.

Besides, for those who want a better layout on mobile, you may use the following css snippet,

div[data-type="dictionary-view"] .results .container {
  max-width: none !important;
}

div[data-type="dictionary-view"] h3 {
  font-size: 1.25rem;
  line-height: 1.2rem;
  margin: 0.3rem;
}

oxdc avatar Feb 10 '22 03:02 oxdc

I will take a look at the styling for mobile when I have the time soon.

phibr0 avatar Feb 10 '22 16:02 phibr0