Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit 138c5f6

Browse files
committed
fix(home): fix to lazy img src on safari
1 parent 28caf4e commit 138c5f6

File tree

3 files changed

+33
-30
lines changed

3 files changed

+33
-30
lines changed

src/components.d.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -176,207 +176,207 @@ declare global {
176176
prototype: HTMLAppCarouselIndicatorsElement;
177177
new (): HTMLAppCarouselIndicatorsElement;
178178
};
179-
179+
180180

181181
interface HTMLAppCtaElement extends StencilComponents.AppCta, HTMLStencilElement {}
182182

183183
var HTMLAppCtaElement: {
184184
prototype: HTMLAppCtaElement;
185185
new (): HTMLAppCtaElement;
186186
};
187-
187+
188188

189189
interface HTMLAppFooterElement extends StencilComponents.AppFooter, HTMLStencilElement {}
190190

191191
var HTMLAppFooterElement: {
192192
prototype: HTMLAppFooterElement;
193193
new (): HTMLAppFooterElement;
194194
};
195-
195+
196196

197197
interface HTMLAppImgElement extends StencilComponents.AppImg, HTMLStencilElement {}
198198

199199
var HTMLAppImgElement: {
200200
prototype: HTMLAppImgElement;
201201
new (): HTMLAppImgElement;
202202
};
203-
203+
204204

205205
interface HTMLLazyImgElement extends StencilComponents.LazyImg, HTMLStencilElement {}
206206

207207
var HTMLLazyImgElement: {
208208
prototype: HTMLLazyImgElement;
209209
new (): HTMLLazyImgElement;
210210
};
211-
211+
212212

213213
interface HTMLAppInputElement extends StencilComponents.AppInput, HTMLStencilElement {}
214214

215215
var HTMLAppInputElement: {
216216
prototype: HTMLAppInputElement;
217217
new (): HTMLAppInputElement;
218218
};
219-
219+
220220

221221
interface HTMLAppMembersElement extends StencilComponents.AppMembers, HTMLStencilElement {}
222222

223223
var HTMLAppMembersElement: {
224224
prototype: HTMLAppMembersElement;
225225
new (): HTMLAppMembersElement;
226226
};
227-
227+
228228

229229
interface HTMLAppNavHeaderElement extends StencilComponents.AppNavHeader, HTMLStencilElement {}
230230

231231
var HTMLAppNavHeaderElement: {
232232
prototype: HTMLAppNavHeaderElement;
233233
new (): HTMLAppNavHeaderElement;
234234
};
235-
235+
236236

237237
interface HTMLAppRadioElement extends StencilComponents.AppRadio, HTMLStencilElement {}
238238

239239
var HTMLAppRadioElement: {
240240
prototype: HTMLAppRadioElement;
241241
new (): HTMLAppRadioElement;
242242
};
243-
243+
244244

245245
interface HTMLAppSliderElement extends StencilComponents.AppSlider, HTMLStencilElement {}
246246

247247
var HTMLAppSliderElement: {
248248
prototype: HTMLAppSliderElement;
249249
new (): HTMLAppSliderElement;
250250
};
251-
251+
252252

253253
interface HTMLAppTextareaElement extends StencilComponents.AppTextarea, HTMLStencilElement {}
254254

255255
var HTMLAppTextareaElement: {
256256
prototype: HTMLAppTextareaElement;
257257
new (): HTMLAppTextareaElement;
258258
};
259-
259+
260260

261261
interface HTMLAppTranslateElement extends StencilComponents.AppTranslate, HTMLStencilElement {}
262262

263263
var HTMLAppTranslateElement: {
264264
prototype: HTMLAppTranslateElement;
265265
new (): HTMLAppTranslateElement;
266266
};
267-
267+
268268

269269
interface HTMLContentGraphicElement extends StencilComponents.ContentGraphic, HTMLStencilElement {}
270270

271271
var HTMLContentGraphicElement: {
272272
prototype: HTMLContentGraphicElement;
273273
new (): HTMLContentGraphicElement;
274274
};
275-
275+
276276

277277
interface HTMLApp404Element extends StencilComponents.App404, HTMLStencilElement {}
278278

279279
var HTMLApp404Element: {
280280
prototype: HTMLApp404Element;
281281
new (): HTMLApp404Element;
282282
};
283-
283+
284284

285285
interface HTMLAppAboutElement extends StencilComponents.AppAbout, HTMLStencilElement {}
286286

287287
var HTMLAppAboutElement: {
288288
prototype: HTMLAppAboutElement;
289289
new (): HTMLAppAboutElement;
290290
};
291-
291+
292292

293293
interface HTMLAppCaseStudyElement extends StencilComponents.AppCaseStudy, HTMLStencilElement {}
294294

295295
var HTMLAppCaseStudyElement: {
296296
prototype: HTMLAppCaseStudyElement;
297297
new (): HTMLAppCaseStudyElement;
298298
};
299-
299+
300300

301301
interface HTMLAppContactElement extends StencilComponents.AppContact, HTMLStencilElement {}
302302

303303
var HTMLAppContactElement: {
304304
prototype: HTMLAppContactElement;
305305
new (): HTMLAppContactElement;
306306
};
307-
307+
308308

309309
interface HTMLAppDetailedServiceElement extends StencilComponents.AppDetailedService, HTMLStencilElement {}
310310

311311
var HTMLAppDetailedServiceElement: {
312312
prototype: HTMLAppDetailedServiceElement;
313313
new (): HTMLAppDetailedServiceElement;
314314
};
315-
315+
316316

317317
interface HTMLAppHomeElement extends StencilComponents.AppHome, HTMLStencilElement {}
318318

319319
var HTMLAppHomeElement: {
320320
prototype: HTMLAppHomeElement;
321321
new (): HTMLAppHomeElement;
322322
};
323-
323+
324324

325325
interface HTMLAppOpportunitiesElement extends StencilComponents.AppOpportunities, HTMLStencilElement {}
326326

327327
var HTMLAppOpportunitiesElement: {
328328
prototype: HTMLAppOpportunitiesElement;
329329
new (): HTMLAppOpportunitiesElement;
330330
};
331-
331+
332332

333333
interface HTMLAppResourcesElement extends StencilComponents.AppResources, HTMLStencilElement {}
334334

335335
var HTMLAppResourcesElement: {
336336
prototype: HTMLAppResourcesElement;
337337
new (): HTMLAppResourcesElement;
338338
};
339-
339+
340340

341341
interface HTMLAppServiceLevelAgreementElement extends StencilComponents.AppServiceLevelAgreement, HTMLStencilElement {}
342342

343343
var HTMLAppServiceLevelAgreementElement: {
344344
prototype: HTMLAppServiceLevelAgreementElement;
345345
new (): HTMLAppServiceLevelAgreementElement;
346346
};
347-
347+
348348

349349
interface HTMLAppTeamLandingElement extends StencilComponents.AppTeamLanding, HTMLStencilElement {}
350350

351351
var HTMLAppTeamLandingElement: {
352352
prototype: HTMLAppTeamLandingElement;
353353
new (): HTMLAppTeamLandingElement;
354354
};
355-
355+
356356

357357
interface HTMLAppToolboxElement extends StencilComponents.AppToolbox, HTMLStencilElement {}
358358

359359
var HTMLAppToolboxElement: {
360360
prototype: HTMLAppToolboxElement;
361361
new (): HTMLAppToolboxElement;
362362
};
363-
363+
364364

365365
interface HTMLAppTosElement extends StencilComponents.AppTos, HTMLStencilElement {}
366366

367367
var HTMLAppTosElement: {
368368
prototype: HTMLAppTosElement;
369369
new (): HTMLAppTosElement;
370370
};
371-
371+
372372

373373
interface HTMLOpenForgeAppElement extends StencilComponents.OpenForgeApp, HTMLStencilElement {}
374374

375375
var HTMLOpenForgeAppElement: {
376376
prototype: HTMLOpenForgeAppElement;
377377
new (): HTMLOpenForgeAppElement;
378378
};
379-
379+
380380

381381
namespace JSX {
382382
interface Element {}

src/components/app-img/lazy-img.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ export class LazyImg {
5050
}
5151

5252
handleImage() {
53+
console.log('a');
5354
const image = this.image;
54-
image.setAttribute('src', image.getAttribute('data-src') || '');
55+
image.setAttribute('src', this.src || '');
5556
image.onload = () => {
5657
image.removeAttribute('data-src');
5758
this.lazyImgloaded.emit(image);

src/pages/app-home/app-home.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,11 @@
298298
}
299299

300300
.phone-image {
301-
height: 440px;
302-
@include media-breakpoint-down(sm) {
303-
height: auto;
301+
img {
302+
height: 440px;
303+
@include media-breakpoint-down(sm) {
304+
height: auto;
305+
}
304306
}
305307
}
306308
}

0 commit comments

Comments
 (0)